cortexapps-cli 1.19.2__tar.gz → 1.20.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (95) hide show
  1. {cortexapps_cli-1.19.2 → cortexapps_cli-1.20.0}/PKG-INFO +1 -1
  2. {cortexapps_cli-1.19.2 → cortexapps_cli-1.20.0}/cortexapps_cli/cli.py +2 -0
  3. cortexapps_cli-1.20.0/cortexapps_cli/commands/users.py +5 -0
  4. cortexapps_cli-1.20.0/cortexapps_cli/commands/users_commands/roles.py +49 -0
  5. {cortexapps_cli-1.19.2 → cortexapps_cli-1.20.0}/pyproject.toml +1 -1
  6. {cortexapps_cli-1.19.2 → cortexapps_cli-1.20.0}/LICENSE +0 -0
  7. {cortexapps_cli-1.19.2 → cortexapps_cli-1.20.0}/README.rst +0 -0
  8. {cortexapps_cli-1.19.2 → cortexapps_cli-1.20.0}/cortexapps_cli/__init__.py +0 -0
  9. {cortexapps_cli-1.19.2 → cortexapps_cli-1.20.0}/cortexapps_cli/command_options.py +0 -0
  10. {cortexapps_cli-1.19.2 → cortexapps_cli-1.20.0}/cortexapps_cli/commands/api_keys.py +0 -0
  11. {cortexapps_cli-1.19.2 → cortexapps_cli-1.20.0}/cortexapps_cli/commands/audit_logs.py +0 -0
  12. {cortexapps_cli-1.19.2 → cortexapps_cli-1.20.0}/cortexapps_cli/commands/backup.py +0 -0
  13. {cortexapps_cli-1.19.2 → cortexapps_cli-1.20.0}/cortexapps_cli/commands/backup_commands/cortex_export.py +0 -0
  14. {cortexapps_cli-1.19.2 → cortexapps_cli-1.20.0}/cortexapps_cli/commands/catalog.py +0 -0
  15. {cortexapps_cli-1.19.2 → cortexapps_cli-1.20.0}/cortexapps_cli/commands/custom_data.py +0 -0
  16. {cortexapps_cli-1.19.2 → cortexapps_cli-1.20.0}/cortexapps_cli/commands/custom_events.py +0 -0
  17. {cortexapps_cli-1.19.2 → cortexapps_cli-1.20.0}/cortexapps_cli/commands/custom_metrics.py +0 -0
  18. {cortexapps_cli-1.19.2 → cortexapps_cli-1.20.0}/cortexapps_cli/commands/dependencies.py +0 -0
  19. {cortexapps_cli-1.19.2 → cortexapps_cli-1.20.0}/cortexapps_cli/commands/deploys.py +0 -0
  20. {cortexapps_cli-1.19.2 → cortexapps_cli-1.20.0}/cortexapps_cli/commands/discovery_audit.py +0 -0
  21. {cortexapps_cli-1.19.2 → cortexapps_cli-1.20.0}/cortexapps_cli/commands/docs.py +0 -0
  22. {cortexapps_cli-1.19.2 → cortexapps_cli-1.20.0}/cortexapps_cli/commands/entity_relationship_types.py +0 -0
  23. {cortexapps_cli-1.19.2 → cortexapps_cli-1.20.0}/cortexapps_cli/commands/entity_relationships.py +0 -0
  24. {cortexapps_cli-1.19.2 → cortexapps_cli-1.20.0}/cortexapps_cli/commands/entity_types.py +0 -0
  25. {cortexapps_cli-1.19.2 → cortexapps_cli-1.20.0}/cortexapps_cli/commands/gitops_logs.py +0 -0
  26. {cortexapps_cli-1.19.2 → cortexapps_cli-1.20.0}/cortexapps_cli/commands/groups.py +0 -0
  27. {cortexapps_cli-1.19.2 → cortexapps_cli-1.20.0}/cortexapps_cli/commands/initiatives.py +0 -0
  28. {cortexapps_cli-1.19.2 → cortexapps_cli-1.20.0}/cortexapps_cli/commands/integrations.py +0 -0
  29. {cortexapps_cli-1.19.2 → cortexapps_cli-1.20.0}/cortexapps_cli/commands/integrations_commands/apiiro.py +0 -0
  30. {cortexapps_cli-1.19.2 → cortexapps_cli-1.20.0}/cortexapps_cli/commands/integrations_commands/argocd.py +0 -0
  31. {cortexapps_cli-1.19.2 → cortexapps_cli-1.20.0}/cortexapps_cli/commands/integrations_commands/aws.py +0 -0
  32. {cortexapps_cli-1.19.2 → cortexapps_cli-1.20.0}/cortexapps_cli/commands/integrations_commands/azure_active_directory.py +0 -0
  33. {cortexapps_cli-1.19.2 → cortexapps_cli-1.20.0}/cortexapps_cli/commands/integrations_commands/azure_devops.py +0 -0
  34. {cortexapps_cli-1.19.2 → cortexapps_cli-1.20.0}/cortexapps_cli/commands/integrations_commands/azure_resources.py +0 -0
  35. {cortexapps_cli-1.19.2 → cortexapps_cli-1.20.0}/cortexapps_cli/commands/integrations_commands/bamboohr.py +0 -0
  36. {cortexapps_cli-1.19.2 → cortexapps_cli-1.20.0}/cortexapps_cli/commands/integrations_commands/bitbucket.py +0 -0
  37. {cortexapps_cli-1.19.2 → cortexapps_cli-1.20.0}/cortexapps_cli/commands/integrations_commands/bugsnag.py +0 -0
  38. {cortexapps_cli-1.19.2 → cortexapps_cli-1.20.0}/cortexapps_cli/commands/integrations_commands/buildkite.py +0 -0
  39. {cortexapps_cli-1.19.2 → cortexapps_cli-1.20.0}/cortexapps_cli/commands/integrations_commands/checkmarx_sast.py +0 -0
  40. {cortexapps_cli-1.19.2 → cortexapps_cli-1.20.0}/cortexapps_cli/commands/integrations_commands/circleci.py +0 -0
  41. {cortexapps_cli-1.19.2 → cortexapps_cli-1.20.0}/cortexapps_cli/commands/integrations_commands/clickup.py +0 -0
  42. {cortexapps_cli-1.19.2 → cortexapps_cli-1.20.0}/cortexapps_cli/commands/integrations_commands/codecov.py +0 -0
  43. {cortexapps_cli-1.19.2 → cortexapps_cli-1.20.0}/cortexapps_cli/commands/integrations_commands/coralogix.py +0 -0
  44. {cortexapps_cli-1.19.2 → cortexapps_cli-1.20.0}/cortexapps_cli/commands/integrations_commands/datadog.py +0 -0
  45. {cortexapps_cli-1.19.2 → cortexapps_cli-1.20.0}/cortexapps_cli/commands/integrations_commands/dynatrace.py +0 -0
  46. {cortexapps_cli-1.19.2 → cortexapps_cli-1.20.0}/cortexapps_cli/commands/integrations_commands/firehydrant.py +0 -0
  47. {cortexapps_cli-1.19.2 → cortexapps_cli-1.20.0}/cortexapps_cli/commands/integrations_commands/github.py +0 -0
  48. {cortexapps_cli-1.19.2 → cortexapps_cli-1.20.0}/cortexapps_cli/commands/integrations_commands/gitlab.py +0 -0
  49. {cortexapps_cli-1.19.2 → cortexapps_cli-1.20.0}/cortexapps_cli/commands/integrations_commands/incidentio.py +0 -0
  50. {cortexapps_cli-1.19.2 → cortexapps_cli-1.20.0}/cortexapps_cli/commands/integrations_commands/instana.py +0 -0
  51. {cortexapps_cli-1.19.2 → cortexapps_cli-1.20.0}/cortexapps_cli/commands/integrations_commands/jenkins.py +0 -0
  52. {cortexapps_cli-1.19.2 → cortexapps_cli-1.20.0}/cortexapps_cli/commands/integrations_commands/jira.py +0 -0
  53. {cortexapps_cli-1.19.2 → cortexapps_cli-1.20.0}/cortexapps_cli/commands/integrations_commands/launchdarkly.py +0 -0
  54. {cortexapps_cli-1.19.2 → cortexapps_cli-1.20.0}/cortexapps_cli/commands/integrations_commands/mend_sast.py +0 -0
  55. {cortexapps_cli-1.19.2 → cortexapps_cli-1.20.0}/cortexapps_cli/commands/integrations_commands/mend_sca.py +0 -0
  56. {cortexapps_cli-1.19.2 → cortexapps_cli-1.20.0}/cortexapps_cli/commands/integrations_commands/newrelic.py +0 -0
  57. {cortexapps_cli-1.19.2 → cortexapps_cli-1.20.0}/cortexapps_cli/commands/integrations_commands/okta.py +0 -0
  58. {cortexapps_cli-1.19.2 → cortexapps_cli-1.20.0}/cortexapps_cli/commands/integrations_commands/opsgenie.py +0 -0
  59. {cortexapps_cli-1.19.2 → cortexapps_cli-1.20.0}/cortexapps_cli/commands/integrations_commands/pagerduty.py +0 -0
  60. {cortexapps_cli-1.19.2 → cortexapps_cli-1.20.0}/cortexapps_cli/commands/integrations_commands/prometheus.py +0 -0
  61. {cortexapps_cli-1.19.2 → cortexapps_cli-1.20.0}/cortexapps_cli/commands/integrations_commands/rollbar.py +0 -0
  62. {cortexapps_cli-1.19.2 → cortexapps_cli-1.20.0}/cortexapps_cli/commands/integrations_commands/rootly.py +0 -0
  63. {cortexapps_cli-1.19.2 → cortexapps_cli-1.20.0}/cortexapps_cli/commands/integrations_commands/semgrep.py +0 -0
  64. {cortexapps_cli-1.19.2 → cortexapps_cli-1.20.0}/cortexapps_cli/commands/integrations_commands/sentry.py +0 -0
  65. {cortexapps_cli-1.19.2 → cortexapps_cli-1.20.0}/cortexapps_cli/commands/integrations_commands/servicenow.py +0 -0
  66. {cortexapps_cli-1.19.2 → cortexapps_cli-1.20.0}/cortexapps_cli/commands/integrations_commands/servicenow_cloud_observability.py +0 -0
  67. {cortexapps_cli-1.19.2 → cortexapps_cli-1.20.0}/cortexapps_cli/commands/integrations_commands/snyk.py +0 -0
  68. {cortexapps_cli-1.19.2 → cortexapps_cli-1.20.0}/cortexapps_cli/commands/integrations_commands/sonarqube.py +0 -0
  69. {cortexapps_cli-1.19.2 → cortexapps_cli-1.20.0}/cortexapps_cli/commands/integrations_commands/splunk_observability_cloud.py +0 -0
  70. {cortexapps_cli-1.19.2 → cortexapps_cli-1.20.0}/cortexapps_cli/commands/integrations_commands/splunk_on_call.py +0 -0
  71. {cortexapps_cli-1.19.2 → cortexapps_cli-1.20.0}/cortexapps_cli/commands/integrations_commands/sumologic.py +0 -0
  72. {cortexapps_cli-1.19.2 → cortexapps_cli-1.20.0}/cortexapps_cli/commands/integrations_commands/veracode.py +0 -0
  73. {cortexapps_cli-1.19.2 → cortexapps_cli-1.20.0}/cortexapps_cli/commands/integrations_commands/wiz.py +0 -0
  74. {cortexapps_cli-1.19.2 → cortexapps_cli-1.20.0}/cortexapps_cli/commands/integrations_commands/workday.py +0 -0
  75. {cortexapps_cli-1.19.2 → cortexapps_cli-1.20.0}/cortexapps_cli/commands/integrations_commands/xmatters.py +0 -0
  76. {cortexapps_cli-1.19.2 → cortexapps_cli-1.20.0}/cortexapps_cli/commands/ip_allowlist.py +0 -0
  77. {cortexapps_cli-1.19.2 → cortexapps_cli-1.20.0}/cortexapps_cli/commands/on_call.py +0 -0
  78. {cortexapps_cli-1.19.2 → cortexapps_cli-1.20.0}/cortexapps_cli/commands/packages.py +0 -0
  79. {cortexapps_cli-1.19.2 → cortexapps_cli-1.20.0}/cortexapps_cli/commands/packages_commands/go.py +0 -0
  80. {cortexapps_cli-1.19.2 → cortexapps_cli-1.20.0}/cortexapps_cli/commands/packages_commands/java.py +0 -0
  81. {cortexapps_cli-1.19.2 → cortexapps_cli-1.20.0}/cortexapps_cli/commands/packages_commands/node.py +0 -0
  82. {cortexapps_cli-1.19.2 → cortexapps_cli-1.20.0}/cortexapps_cli/commands/packages_commands/nuget.py +0 -0
  83. {cortexapps_cli-1.19.2 → cortexapps_cli-1.20.0}/cortexapps_cli/commands/packages_commands/python.py +0 -0
  84. {cortexapps_cli-1.19.2 → cortexapps_cli-1.20.0}/cortexapps_cli/commands/plugins.py +0 -0
  85. {cortexapps_cli-1.19.2 → cortexapps_cli-1.20.0}/cortexapps_cli/commands/queries.py +0 -0
  86. {cortexapps_cli-1.19.2 → cortexapps_cli-1.20.0}/cortexapps_cli/commands/rest.py +0 -0
  87. {cortexapps_cli-1.19.2 → cortexapps_cli-1.20.0}/cortexapps_cli/commands/scim.py +0 -0
  88. {cortexapps_cli-1.19.2 → cortexapps_cli-1.20.0}/cortexapps_cli/commands/scorecards.py +0 -0
  89. {cortexapps_cli-1.19.2 → cortexapps_cli-1.20.0}/cortexapps_cli/commands/scorecards_commands/exemptions.py +0 -0
  90. {cortexapps_cli-1.19.2 → cortexapps_cli-1.20.0}/cortexapps_cli/commands/secrets.py +0 -0
  91. {cortexapps_cli-1.19.2 → cortexapps_cli-1.20.0}/cortexapps_cli/commands/teams.py +0 -0
  92. {cortexapps_cli-1.19.2 → cortexapps_cli-1.20.0}/cortexapps_cli/commands/workflows.py +0 -0
  93. {cortexapps_cli-1.19.2 → cortexapps_cli-1.20.0}/cortexapps_cli/cortex_client.py +0 -0
  94. {cortexapps_cli-1.19.2 → cortexapps_cli-1.20.0}/cortexapps_cli/models/team.py +0 -0
  95. {cortexapps_cli-1.19.2 → cortexapps_cli-1.20.0}/cortexapps_cli/utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cortexapps-cli
3
- Version: 1.19.2
3
+ Version: 1.20.0
4
4
  Summary: Command Line Interface for cortexapps
5
5
  License: MIT
6
6
  License-File: LICENSE
@@ -40,6 +40,7 @@ import cortexapps_cli.commands.scim as scim
40
40
  import cortexapps_cli.commands.scorecards as scorecards
41
41
  import cortexapps_cli.commands.secrets as secrets
42
42
  import cortexapps_cli.commands.teams as teams
43
+ import cortexapps_cli.commands.users as users
43
44
  import cortexapps_cli.commands.workflows as workflows
44
45
 
45
46
  app = typer.Typer(
@@ -77,6 +78,7 @@ app.add_typer(scim.app, name="scim")
77
78
  app.add_typer(scorecards.app, name="scorecards")
78
79
  app.add_typer(secrets.app, name="secrets")
79
80
  app.add_typer(teams.app, name="teams")
81
+ app.add_typer(users.app, name="users")
80
82
  app.add_typer(workflows.app, name="workflows")
81
83
 
82
84
  # global options
@@ -0,0 +1,5 @@
1
+ import typer
2
+ import cortexapps_cli.commands.users_commands.roles as roles
3
+
4
+ app = typer.Typer(help="Users commands", no_args_is_help=True)
5
+ app.add_typer(roles.app, name="roles")
@@ -0,0 +1,49 @@
1
+ from typing import List, Optional
2
+ import typer
3
+ from cortexapps_cli.command_options import ListCommandOptions
4
+ from cortexapps_cli.utils import print_output_with_context
5
+
6
+ app = typer.Typer(help="Roles commands", no_args_is_help=True)
7
+
8
+ @app.command()
9
+ def list(
10
+ ctx: typer.Context,
11
+ email: Optional[List[str]] = typer.Option(None, "--email", "-e", help="Filter by email address; can be specified multiple times", show_default=False),
12
+ page: ListCommandOptions.page = None,
13
+ page_size: ListCommandOptions.page_size = 250,
14
+ table_output: ListCommandOptions.table_output = False,
15
+ csv_output: ListCommandOptions.csv_output = False,
16
+ columns: ListCommandOptions.columns = [],
17
+ no_headers: ListCommandOptions.no_headers = False,
18
+ filters: ListCommandOptions.filters = [],
19
+ sort: ListCommandOptions.sort = [],
20
+ ):
21
+ """
22
+ List user role assignments. The API key used to make the request must have the View Roles permission.
23
+ """
24
+
25
+ client = ctx.obj["client"]
26
+
27
+ params = {
28
+ "page": page,
29
+ "pageSize": page_size,
30
+ }
31
+
32
+ if email:
33
+ params["email"] = ",".join(email)
34
+
35
+ if (table_output or csv_output) and not ctx.params.get('columns'):
36
+ ctx.params['columns'] = [
37
+ "Email=email",
38
+ "Name=name",
39
+ "Roles=roles",
40
+ ]
41
+
42
+ # remove any params that are None
43
+ params = {k: v for k, v in params.items() if v is not None}
44
+
45
+ if page is None:
46
+ r = client.fetch("api/v1/users/roles", params=params)
47
+ else:
48
+ r = client.get("api/v1/users/roles", params=params)
49
+ print_output_with_context(ctx, r)
@@ -1,7 +1,7 @@
1
1
  [tool.poetry]
2
2
  name = "cortexapps-cli"
3
3
  # version will be incremented via command line as part of github actions build
4
- version = "1.19.2"
4
+ version = "1.20.0"
5
5
  description = "Command Line Interface for cortexapps"
6
6
  license = "MIT"
7
7
  authors = [
File without changes