diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index a2cdd289a..80e1ddaab 100644
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -6,6 +6,40 @@ All notable changes to this project will be documented in this file.
The format is based on `Keep a Changelog `__.
+3.37.14 - 2024-03-19
+--------------------
+Added
+~~~~~
+* The AI Language service
+
+ * Support for async jobs and document translation
+
+ * ``oci ai language job create --compartment-id --input-location --model-metadata-details --output-location --description, --display-name --input-configuration``
+ * ``oci ai language job update --job-id --description --display-name``
+ * ``oci ai language job list --compartment-id --all --display-name --id``
+ * ``oci ai language job get --job-id``
+ * ``oci ai language job delete --job-id``
+ * ``oci ai language job cancel --job-id``
+ * ``oci ai language job change-compartment --compartment-id --job-id``
+
+* Application Performance Monitoring Trace service
+
+ * Support for attribute management for trace and synthetic
+
+ * ``oci apm-traces attributes activate ``
+ * ``oci apm-traces attributes deactivate ``
+ * ``oci apm-traces attributes auto-activate-status ``
+ * ``oci apm-traces attributes pin ``
+ * ``oci apm-traces attributes unpin ``
+ * ``oci apm-traces attributes update-auto-activate ``
+ * ``oci apm-traces attributes update-notes ``
+ * ``oci apm-traces attributes update-attribute ``
+
+ * Support for new optional parameters in the get trace and get span
+
+ * ``oci apm-traces trace trace get --time-trace-started-gte --time-trace-started-lt --trace-namespace ``
+ * ``oci apm-traces trace span get --time-trace-started-gte --time-trace-started-lt --trace-namespace ``
+
3.37.13 - 2024-03-12
--------------------
Added
diff --git a/requirements.txt b/requirements.txt
index 576f31fc9..72eb60e54 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -14,7 +14,7 @@ Jinja2==3.0.3
jmespath==0.10.0
ndg-httpsclient==0.4.2
mock==2.0.0
-oci==2.124.1
+oci==2.124.2
packaging==20.2
pluggy==0.13.0
py==1.11.0
diff --git a/services/ai_language/src/oci_cli_ai_service_language/aiservicelanguage_cli_extended.py b/services/ai_language/src/oci_cli_ai_service_language/aiservicelanguage_cli_extended.py
index 890cd925e..d59e3ff30 100644
--- a/services/ai_language/src/oci_cli_ai_service_language/aiservicelanguage_cli_extended.py
+++ b/services/ai_language/src/oci_cli_ai_service_language/aiservicelanguage_cli_extended.py
@@ -128,3 +128,14 @@ def language_group():
# Add work-request error and logs messages to work-request group
aiservicelanguage_cli.work_request_group.add_command(aiservicelanguage_cli.work_request_error_group)
aiservicelanguage_cli.work_request_group.add_command(aiservicelanguage_cli.work_request_log_group)
+
+
+# Remove polymorphic job group commands
+aiservicelanguage_cli.job_group.commands.pop(aiservicelanguage_cli.create_job_object_storage_file_name_location.name)
+aiservicelanguage_cli.job_group.commands.pop(aiservicelanguage_cli.create_job_object_storage_prefix_location.name)
+
+# Remove job group from root
+aiservicelanguage_cli.ai_root_group.commands.pop(aiservicelanguage_cli.job_group.name)
+
+# Add Job group to language group
+language_group.add_command(aiservicelanguage_cli.job_group)
diff --git a/services/ai_language/src/oci_cli_ai_service_language/generated/aiservicelanguage_cli.py b/services/ai_language/src/oci_cli_ai_service_language/generated/aiservicelanguage_cli.py
index 6dd53097e..1d601bfc2 100644
--- a/services/ai_language/src/oci_cli_ai_service_language/generated/aiservicelanguage_cli.py
+++ b/services/ai_language/src/oci_cli_ai_service_language/generated/aiservicelanguage_cli.py
@@ -66,6 +66,12 @@ def work_request_group():
pass
+@click.command(cli_util.override('ai.job_group.command_name', 'job'), cls=CommandGroupWithAlias, help="""Job details which contain input document details on which prediction need to run, features (which and all language services ) need to run and where to store results""")
+@cli_util.help_option_group
+def job_group():
+ pass
+
+
@click.command(cli_util.override('ai.evaluation_result_collection_group.command_name', 'evaluation-result-collection'), cls=CommandGroupWithAlias, help="""Results of a model evaluation analysis search. Contains EvaluationResultSummary items.""")
@cli_util.help_option_group
def evaluation_result_collection_group():
@@ -151,6 +157,7 @@ def batch_detect_language_text_classification_group():
ai_root_group.add_command(model_type_info_group)
ai_root_group.add_command(model_group)
ai_root_group.add_command(work_request_group)
+ai_root_group.add_command(job_group)
ai_root_group.add_command(evaluation_result_collection_group)
ai_root_group.add_command(detect_language_sentiments_group)
ai_root_group.add_command(batch_detect_language_pii_entities_group)
@@ -426,6 +433,31 @@ def batch_language_translation(ctx, from_json, documents, compartment_id, target
cli_util.render_response(result, ctx)
+@job_group.command(name=cli_util.override('ai.cancel_job.command_name', 'cancel'), help=u"""Canceling the job cancels all the tasks under it. \n[Command Reference](cancelJob)""")
+@cli_util.option('--job-id', required=True, help=u"""Unique Transcription Job identifier.""")
+@cli_util.option('--if-match', help=u"""For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.""")
+@json_skeleton_utils.get_cli_json_input_option({})
+@cli_util.help_option
+@click.pass_context
+@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={})
+@cli_util.wrap_exceptions
+def cancel_job(ctx, from_json, job_id, if_match):
+
+ if isinstance(job_id, six.string_types) and len(job_id.strip()) == 0:
+ raise click.UsageError('Parameter --job-id cannot be whitespace or empty string')
+
+ kwargs = {}
+ if if_match is not None:
+ kwargs['if_match'] = if_match
+ kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
+ client = cli_util.build_client('ai_language', 'ai_service_language', ctx)
+ result = client.cancel_job(
+ job_id=job_id,
+ **kwargs
+ )
+ cli_util.render_response(result, ctx)
+
+
@endpoint_group.command(name=cli_util.override('ai.change_endpoint_compartment.command_name', 'change-compartment'), help=u"""Moves a Endpoint into a different compartment. When provided, If-Match is checked against ETag values of the resource. \n[Command Reference](changeEndpointCompartment)""")
@cli_util.option('--endpoint-id', required=True, help=u"""The OCID of the endpoint.""")
@cli_util.option('--compartment-id', required=True, help=u"""The [OCID] of the compartment into which the resource should be moved.""")
@@ -457,6 +489,37 @@ def change_endpoint_compartment(ctx, from_json, endpoint_id, compartment_id, if_
cli_util.render_response(result, ctx)
+@job_group.command(name=cli_util.override('ai.change_job_compartment.command_name', 'change-compartment'), help=u"""Moves a Job into a different compartment. When provided, If-Match is checked against ETag values of the resource. \n[Command Reference](changeJobCompartment)""")
+@cli_util.option('--job-id', required=True, help=u"""unique job OCID.""")
+@cli_util.option('--compartment-id', required=True, help=u"""The [OCID] of the compartment where the resource should be moved.""")
+@cli_util.option('--if-match', help=u"""For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.""")
+@json_skeleton_utils.get_cli_json_input_option({})
+@cli_util.help_option
+@click.pass_context
+@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={})
+@cli_util.wrap_exceptions
+def change_job_compartment(ctx, from_json, job_id, compartment_id, if_match):
+
+ if isinstance(job_id, six.string_types) and len(job_id.strip()) == 0:
+ raise click.UsageError('Parameter --job-id cannot be whitespace or empty string')
+
+ kwargs = {}
+ if if_match is not None:
+ kwargs['if_match'] = if_match
+ kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
+
+ _details = {}
+ _details['compartmentId'] = compartment_id
+
+ client = cli_util.build_client('ai_language', 'ai_service_language', ctx)
+ result = client.change_job_compartment(
+ job_id=job_id,
+ change_job_compartment_details=_details,
+ **kwargs
+ )
+ cli_util.render_response(result, ctx)
+
+
@model_group.command(name=cli_util.override('ai.change_model_compartment.command_name', 'change-compartment'), help=u"""Moves a Model into a different compartment. When provided, If-Match is checked against ETag values of the resource. \n[Command Reference](changeModelCompartment)""")
@cli_util.option('--model-id', required=True, help=u"""unique model OCID.""")
@cli_util.option('--compartment-id', required=True, help=u"""The [OCID] of the compartment into which the resource should be moved.""")
@@ -594,6 +657,235 @@ def create_endpoint(ctx, from_json, wait_for_state, max_wait_seconds, wait_inter
cli_util.render_response(result, ctx)
+@job_group.command(name=cli_util.override('ai.create_job.command_name', 'create'), help=u"""Creates a new language service async job. \n[Command Reference](createJob)""")
+@cli_util.option('--compartment-id', required=True, help=u"""The [OCID] of the compartment where you want to create the job.""")
+@cli_util.option('--input-location', required=True, type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
+@cli_util.option('--model-metadata-details', required=True, type=custom_types.CLI_COMPLEX_TYPE, help=u"""training model details For this release only one model is allowed to be input here. One of the three modelType, ModelId, endpointId should be given other wise error will be thrown from API""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
+@cli_util.option('--output-location', required=True, type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
+@cli_util.option('--display-name', help=u"""A user-friendly display name for the job.""")
+@cli_util.option('--description', help=u"""A short description of the job.""")
+@cli_util.option('--input-configuration', type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
+@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "WAITING", "SUCCEEDED", "CANCELING", "CANCELED", "NEEDS_ATTENTION"]), multiple=True, help="""This operation asynchronously creates, modifies or deletes a resource and uses a work request to track the progress of the operation. Specify this option to perform the action and then wait until the work request reaches a certain state. Multiple states can be specified, returning on the first state. For example, --wait-for-state SUCCEEDED --wait-for-state FAILED would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.""")
+@cli_util.option('--max-wait-seconds', type=click.INT, help="""The maximum time to wait for the work request to reach the state defined by --wait-for-state. Defaults to 1200 seconds.""")
+@cli_util.option('--wait-interval-seconds', type=click.INT, help="""Check every --wait-interval-seconds to see whether the work request has reached the state defined by --wait-for-state. Defaults to 30 seconds.""")
+@json_skeleton_utils.get_cli_json_input_option({'input-location': {'module': 'ai_language', 'class': 'InputLocation'}, 'input-configuration': {'module': 'ai_language', 'class': 'InputConfiguration'}, 'model-metadata-details': {'module': 'ai_language', 'class': 'list[ModelMetadataDetails]'}, 'output-location': {'module': 'ai_language', 'class': 'ObjectPrefixOutputLocation'}})
+@cli_util.help_option
+@click.pass_context
+@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'input-location': {'module': 'ai_language', 'class': 'InputLocation'}, 'input-configuration': {'module': 'ai_language', 'class': 'InputConfiguration'}, 'model-metadata-details': {'module': 'ai_language', 'class': 'list[ModelMetadataDetails]'}, 'output-location': {'module': 'ai_language', 'class': 'ObjectPrefixOutputLocation'}}, output_type={'module': 'ai_language', 'class': 'Job'})
+@cli_util.wrap_exceptions
+def create_job(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, compartment_id, input_location, model_metadata_details, output_location, display_name, description, input_configuration):
+
+ kwargs = {}
+ kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
+
+ _details = {}
+ _details['compartmentId'] = compartment_id
+ _details['inputLocation'] = cli_util.parse_json_parameter("input_location", input_location)
+ _details['modelMetadataDetails'] = cli_util.parse_json_parameter("model_metadata_details", model_metadata_details)
+ _details['outputLocation'] = cli_util.parse_json_parameter("output_location", output_location)
+
+ if display_name is not None:
+ _details['displayName'] = display_name
+
+ if description is not None:
+ _details['description'] = description
+
+ if input_configuration is not None:
+ _details['inputConfiguration'] = cli_util.parse_json_parameter("input_configuration", input_configuration)
+
+ client = cli_util.build_client('ai_language', 'ai_service_language', ctx)
+ result = client.create_job(
+ create_job_details=_details,
+ **kwargs
+ )
+ if wait_for_state:
+
+ if hasattr(client, 'get_work_request') and callable(getattr(client, 'get_work_request')):
+ try:
+ wait_period_kwargs = {}
+ if max_wait_seconds is not None:
+ wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
+ if wait_interval_seconds is not None:
+ wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
+ if 'opc-work-request-id' not in result.headers:
+ click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state')
+ cli_util.render_response(result, ctx)
+ return
+
+ click.echo('Action completed. Waiting until the work request has entered state: {}'.format(wait_for_state), file=sys.stderr)
+ result = oci.wait_until(client, client.get_work_request(result.headers['opc-work-request-id']), 'status', wait_for_state, **wait_period_kwargs)
+ except oci.exceptions.MaximumWaitTimeExceeded as e:
+ # If we fail, we should show an error, but we should still provide the information to the customer
+ click.echo('Failed to wait until the work request entered the specified state. Outputting last known resource state', file=sys.stderr)
+ cli_util.render_response(result, ctx)
+ sys.exit(2)
+ except Exception:
+ click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state', file=sys.stderr)
+ cli_util.render_response(result, ctx)
+ raise
+ else:
+ click.echo('Unable to wait for the work request to enter the specified state', file=sys.stderr)
+ cli_util.render_response(result, ctx)
+
+
+@job_group.command(name=cli_util.override('ai.create_job_object_storage_prefix_location.command_name', 'create-job-object-storage-prefix-location'), help=u"""Creates a new language service async job. \n[Command Reference](createJob)""")
+@cli_util.option('--compartment-id', required=True, help=u"""The [OCID] of the compartment where you want to create the job.""")
+@cli_util.option('--model-metadata-details', required=True, type=custom_types.CLI_COMPLEX_TYPE, help=u"""training model details For this release only one model is allowed to be input here. One of the three modelType, ModelId, endpointId should be given other wise error will be thrown from API""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
+@cli_util.option('--output-location', required=True, type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
+@cli_util.option('--input-location-namespace-name', required=True, help=u"""Object Storage namespace name.""")
+@cli_util.option('--input-location-bucket-name', required=True, help=u"""Object Storage bucket name.""")
+@cli_util.option('--display-name', help=u"""A user-friendly display name for the job.""")
+@cli_util.option('--description', help=u"""A short description of the job.""")
+@cli_util.option('--input-configuration', type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
+@cli_util.option('--input-location-prefix', help=u"""The prefix (directory) in an Object Storage bucket.""")
+@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "WAITING", "SUCCEEDED", "CANCELING", "CANCELED", "NEEDS_ATTENTION"]), multiple=True, help="""This operation asynchronously creates, modifies or deletes a resource and uses a work request to track the progress of the operation. Specify this option to perform the action and then wait until the work request reaches a certain state. Multiple states can be specified, returning on the first state. For example, --wait-for-state SUCCEEDED --wait-for-state FAILED would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.""")
+@cli_util.option('--max-wait-seconds', type=click.INT, help="""The maximum time to wait for the work request to reach the state defined by --wait-for-state. Defaults to 1200 seconds.""")
+@cli_util.option('--wait-interval-seconds', type=click.INT, help="""Check every --wait-interval-seconds to see whether the work request has reached the state defined by --wait-for-state. Defaults to 30 seconds.""")
+@json_skeleton_utils.get_cli_json_input_option({'input-configuration': {'module': 'ai_language', 'class': 'InputConfiguration'}, 'model-metadata-details': {'module': 'ai_language', 'class': 'list[ModelMetadataDetails]'}, 'output-location': {'module': 'ai_language', 'class': 'ObjectPrefixOutputLocation'}})
+@cli_util.help_option
+@click.pass_context
+@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'input-configuration': {'module': 'ai_language', 'class': 'InputConfiguration'}, 'model-metadata-details': {'module': 'ai_language', 'class': 'list[ModelMetadataDetails]'}, 'output-location': {'module': 'ai_language', 'class': 'ObjectPrefixOutputLocation'}}, output_type={'module': 'ai_language', 'class': 'Job'})
+@cli_util.wrap_exceptions
+def create_job_object_storage_prefix_location(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, compartment_id, model_metadata_details, output_location, input_location_namespace_name, input_location_bucket_name, display_name, description, input_configuration, input_location_prefix):
+
+ kwargs = {}
+ kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
+
+ _details = {}
+ _details['inputLocation'] = {}
+ _details['compartmentId'] = compartment_id
+ _details['modelMetadataDetails'] = cli_util.parse_json_parameter("model_metadata_details", model_metadata_details)
+ _details['outputLocation'] = cli_util.parse_json_parameter("output_location", output_location)
+ _details['inputLocation']['namespaceName'] = input_location_namespace_name
+ _details['inputLocation']['bucketName'] = input_location_bucket_name
+
+ if display_name is not None:
+ _details['displayName'] = display_name
+
+ if description is not None:
+ _details['description'] = description
+
+ if input_configuration is not None:
+ _details['inputConfiguration'] = cli_util.parse_json_parameter("input_configuration", input_configuration)
+
+ if input_location_prefix is not None:
+ _details['inputLocation']['prefix'] = input_location_prefix
+
+ _details['inputLocation']['locationType'] = 'OBJECT_STORAGE_PREFIX'
+
+ client = cli_util.build_client('ai_language', 'ai_service_language', ctx)
+ result = client.create_job(
+ create_job_details=_details,
+ **kwargs
+ )
+ if wait_for_state:
+
+ if hasattr(client, 'get_work_request') and callable(getattr(client, 'get_work_request')):
+ try:
+ wait_period_kwargs = {}
+ if max_wait_seconds is not None:
+ wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
+ if wait_interval_seconds is not None:
+ wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
+ if 'opc-work-request-id' not in result.headers:
+ click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state')
+ cli_util.render_response(result, ctx)
+ return
+
+ click.echo('Action completed. Waiting until the work request has entered state: {}'.format(wait_for_state), file=sys.stderr)
+ result = oci.wait_until(client, client.get_work_request(result.headers['opc-work-request-id']), 'status', wait_for_state, **wait_period_kwargs)
+ except oci.exceptions.MaximumWaitTimeExceeded as e:
+ # If we fail, we should show an error, but we should still provide the information to the customer
+ click.echo('Failed to wait until the work request entered the specified state. Outputting last known resource state', file=sys.stderr)
+ cli_util.render_response(result, ctx)
+ sys.exit(2)
+ except Exception:
+ click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state', file=sys.stderr)
+ cli_util.render_response(result, ctx)
+ raise
+ else:
+ click.echo('Unable to wait for the work request to enter the specified state', file=sys.stderr)
+ cli_util.render_response(result, ctx)
+
+
+@job_group.command(name=cli_util.override('ai.create_job_object_storage_file_name_location.command_name', 'create-job-object-storage-file-name-location'), help=u"""Creates a new language service async job. \n[Command Reference](createJob)""")
+@cli_util.option('--compartment-id', required=True, help=u"""The [OCID] of the compartment where you want to create the job.""")
+@cli_util.option('--model-metadata-details', required=True, type=custom_types.CLI_COMPLEX_TYPE, help=u"""training model details For this release only one model is allowed to be input here. One of the three modelType, ModelId, endpointId should be given other wise error will be thrown from API""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
+@cli_util.option('--output-location', required=True, type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
+@cli_util.option('--input-location-namespace-name', required=True, help=u"""Object Storage namespace name.""")
+@cli_util.option('--input-location-bucket-name', required=True, help=u"""Object Storage bucket name.""")
+@cli_util.option('--input-location-object-names', required=True, type=custom_types.CLI_COMPLEX_TYPE, help=u"""List of objects to be processed""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
+@cli_util.option('--display-name', help=u"""A user-friendly display name for the job.""")
+@cli_util.option('--description', help=u"""A short description of the job.""")
+@cli_util.option('--input-configuration', type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
+@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "WAITING", "SUCCEEDED", "CANCELING", "CANCELED", "NEEDS_ATTENTION"]), multiple=True, help="""This operation asynchronously creates, modifies or deletes a resource and uses a work request to track the progress of the operation. Specify this option to perform the action and then wait until the work request reaches a certain state. Multiple states can be specified, returning on the first state. For example, --wait-for-state SUCCEEDED --wait-for-state FAILED would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.""")
+@cli_util.option('--max-wait-seconds', type=click.INT, help="""The maximum time to wait for the work request to reach the state defined by --wait-for-state. Defaults to 1200 seconds.""")
+@cli_util.option('--wait-interval-seconds', type=click.INT, help="""Check every --wait-interval-seconds to see whether the work request has reached the state defined by --wait-for-state. Defaults to 30 seconds.""")
+@json_skeleton_utils.get_cli_json_input_option({'input-configuration': {'module': 'ai_language', 'class': 'InputConfiguration'}, 'model-metadata-details': {'module': 'ai_language', 'class': 'list[ModelMetadataDetails]'}, 'output-location': {'module': 'ai_language', 'class': 'ObjectPrefixOutputLocation'}, 'input-location-object-names': {'module': 'ai_language', 'class': 'list[string]'}})
+@cli_util.help_option
+@click.pass_context
+@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'input-configuration': {'module': 'ai_language', 'class': 'InputConfiguration'}, 'model-metadata-details': {'module': 'ai_language', 'class': 'list[ModelMetadataDetails]'}, 'output-location': {'module': 'ai_language', 'class': 'ObjectPrefixOutputLocation'}, 'input-location-object-names': {'module': 'ai_language', 'class': 'list[string]'}}, output_type={'module': 'ai_language', 'class': 'Job'})
+@cli_util.wrap_exceptions
+def create_job_object_storage_file_name_location(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, compartment_id, model_metadata_details, output_location, input_location_namespace_name, input_location_bucket_name, input_location_object_names, display_name, description, input_configuration):
+
+ kwargs = {}
+ kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
+
+ _details = {}
+ _details['inputLocation'] = {}
+ _details['compartmentId'] = compartment_id
+ _details['modelMetadataDetails'] = cli_util.parse_json_parameter("model_metadata_details", model_metadata_details)
+ _details['outputLocation'] = cli_util.parse_json_parameter("output_location", output_location)
+ _details['inputLocation']['namespaceName'] = input_location_namespace_name
+ _details['inputLocation']['bucketName'] = input_location_bucket_name
+ _details['inputLocation']['objectNames'] = cli_util.parse_json_parameter("input_location_object_names", input_location_object_names)
+
+ if display_name is not None:
+ _details['displayName'] = display_name
+
+ if description is not None:
+ _details['description'] = description
+
+ if input_configuration is not None:
+ _details['inputConfiguration'] = cli_util.parse_json_parameter("input_configuration", input_configuration)
+
+ _details['inputLocation']['locationType'] = 'OBJECT_STORAGE_FILE_LIST'
+
+ client = cli_util.build_client('ai_language', 'ai_service_language', ctx)
+ result = client.create_job(
+ create_job_details=_details,
+ **kwargs
+ )
+ if wait_for_state:
+
+ if hasattr(client, 'get_work_request') and callable(getattr(client, 'get_work_request')):
+ try:
+ wait_period_kwargs = {}
+ if max_wait_seconds is not None:
+ wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
+ if wait_interval_seconds is not None:
+ wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
+ if 'opc-work-request-id' not in result.headers:
+ click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state')
+ cli_util.render_response(result, ctx)
+ return
+
+ click.echo('Action completed. Waiting until the work request has entered state: {}'.format(wait_for_state), file=sys.stderr)
+ result = oci.wait_until(client, client.get_work_request(result.headers['opc-work-request-id']), 'status', wait_for_state, **wait_period_kwargs)
+ except oci.exceptions.MaximumWaitTimeExceeded as e:
+ # If we fail, we should show an error, but we should still provide the information to the customer
+ click.echo('Failed to wait until the work request entered the specified state. Outputting last known resource state', file=sys.stderr)
+ cli_util.render_response(result, ctx)
+ sys.exit(2)
+ except Exception:
+ click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state', file=sys.stderr)
+ cli_util.render_response(result, ctx)
+ raise
+ else:
+ click.echo('Unable to wait for the work request to enter the specified state', file=sys.stderr)
+ cli_util.render_response(result, ctx)
+
+
@model_group.command(name=cli_util.override('ai.create_model.command_name', 'create'), help=u"""Creates a new model for training and train the model with date provided. \n[Command Reference](createModel)""")
@cli_util.option('--compartment-id', required=True, help=u"""The [OCID] for the models compartment.""")
@cli_util.option('--project-id', required=True, help=u"""The [OCID] of the project to associate with the model.""")
@@ -2040,6 +2332,62 @@ def delete_endpoint(ctx, from_json, wait_for_state, max_wait_seconds, wait_inter
cli_util.render_response(result, ctx)
+@job_group.command(name=cli_util.override('ai.delete_job.command_name', 'delete'), help=u"""Deletes the language service async Job \n[Command Reference](deleteJob)""")
+@cli_util.option('--job-id', required=True, help=u"""Unique Transcription Job identifier.""")
+@cli_util.option('--if-match', help=u"""For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.""")
+@cli_util.confirm_delete_option
+@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "WAITING", "SUCCEEDED", "CANCELING", "CANCELED", "NEEDS_ATTENTION"]), multiple=True, help="""This operation asynchronously creates, modifies or deletes a resource and uses a work request to track the progress of the operation. Specify this option to perform the action and then wait until the work request reaches a certain state. Multiple states can be specified, returning on the first state. For example, --wait-for-state SUCCEEDED --wait-for-state FAILED would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.""")
+@cli_util.option('--max-wait-seconds', type=click.INT, help="""The maximum time to wait for the work request to reach the state defined by --wait-for-state. Defaults to 1200 seconds.""")
+@cli_util.option('--wait-interval-seconds', type=click.INT, help="""Check every --wait-interval-seconds to see whether the work request has reached the state defined by --wait-for-state. Defaults to 30 seconds.""")
+@json_skeleton_utils.get_cli_json_input_option({})
+@cli_util.help_option
+@click.pass_context
+@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={})
+@cli_util.wrap_exceptions
+def delete_job(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, job_id, if_match):
+
+ if isinstance(job_id, six.string_types) and len(job_id.strip()) == 0:
+ raise click.UsageError('Parameter --job-id cannot be whitespace or empty string')
+
+ kwargs = {}
+ if if_match is not None:
+ kwargs['if_match'] = if_match
+ kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
+ client = cli_util.build_client('ai_language', 'ai_service_language', ctx)
+ result = client.delete_job(
+ job_id=job_id,
+ **kwargs
+ )
+ if wait_for_state:
+
+ if hasattr(client, 'get_work_request') and callable(getattr(client, 'get_work_request')):
+ try:
+ wait_period_kwargs = {}
+ if max_wait_seconds is not None:
+ wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
+ if wait_interval_seconds is not None:
+ wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
+ if 'opc-work-request-id' not in result.headers:
+ click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state')
+ cli_util.render_response(result, ctx)
+ return
+
+ click.echo('Action completed. Waiting until the work request has entered state: {}'.format(wait_for_state), file=sys.stderr)
+ result = oci.wait_until(client, client.get_work_request(result.headers['opc-work-request-id']), 'status', wait_for_state, **wait_period_kwargs)
+ except oci.exceptions.MaximumWaitTimeExceeded as e:
+ # If we fail, we should show an error, but we should still provide the information to the customer
+ click.echo('Failed to wait until the work request entered the specified state. Please retrieve the work request to find its current state', file=sys.stderr)
+ cli_util.render_response(result, ctx)
+ sys.exit(2)
+ except Exception:
+ click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state', file=sys.stderr)
+ cli_util.render_response(result, ctx)
+ raise
+ else:
+ click.echo('Unable to wait for the work request to enter the specified state', file=sys.stderr)
+ cli_util.render_response(result, ctx)
+
+
@model_group.command(name=cli_util.override('ai.delete_model.command_name', 'delete'), help=u"""Deletes a provisioned model resource by identifier. This operation fails with a 409 error unless all associated resources are in a DELETED state. You must delete all associated resources before deleting a model. \n[Command Reference](deleteModel)""")
@cli_util.option('--model-id', required=True, help=u"""unique model OCID.""")
@cli_util.option('--if-match', help=u"""For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.""")
@@ -2323,6 +2671,28 @@ def get_endpoint(ctx, from_json, endpoint_id):
cli_util.render_response(result, ctx)
+@job_group.command(name=cli_util.override('ai.get_job.command_name', 'get'), help=u"""Gets a language service async job \n[Command Reference](getJob)""")
+@cli_util.option('--job-id', required=True, help=u"""Unique Transcription Job identifier.""")
+@json_skeleton_utils.get_cli_json_input_option({})
+@cli_util.help_option
+@click.pass_context
+@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'ai_language', 'class': 'Job'})
+@cli_util.wrap_exceptions
+def get_job(ctx, from_json, job_id):
+
+ if isinstance(job_id, six.string_types) and len(job_id.strip()) == 0:
+ raise click.UsageError('Parameter --job-id cannot be whitespace or empty string')
+
+ kwargs = {}
+ kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
+ client = cli_util.build_client('ai_language', 'ai_service_language', ctx)
+ result = client.get_job(
+ job_id=job_id,
+ **kwargs
+ )
+ cli_util.render_response(result, ctx)
+
+
@model_group.command(name=cli_util.override('ai.get_model.command_name', 'get'), help=u"""Gets a model by identifier \n[Command Reference](getModel)""")
@cli_util.option('--model-id', required=True, help=u"""unique model OCID.""")
@json_skeleton_utils.get_cli_json_input_option({})
@@ -2531,6 +2901,69 @@ def list_evaluation_results(ctx, from_json, all_pages, page_size, model_id, limi
cli_util.render_response(result, ctx)
+@job_group.command(name=cli_util.override('ai.list_jobs.command_name', 'list'), help=u"""Returns a list of language service async Jobs. \n[Command Reference](listJobs)""")
+@cli_util.option('--compartment-id', required=True, help=u"""The ID of the compartment in which to list resources.""")
+@cli_util.option('--lifecycle-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "SUCCEEDED", "FAILED", "CANCELING", "CANCELED", "DELETING", "DELETED"]), help=u"""A filter to return only resources whose lifecycleState matches the given lifecycleState.""")
+@cli_util.option('--display-name', help=u"""A filter to return only resources that match the entire display name given.""")
+@cli_util.option('--id', help=u"""Unique identifier(OCID).""")
+@cli_util.option('--limit', type=click.INT, help=u"""The maximum number of items to return.""")
+@cli_util.option('--page', help=u"""The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call.""")
+@cli_util.option('--sort-order', type=custom_types.CliCaseInsensitiveChoice(["ASC", "DESC"]), help=u"""The sort order to use, either 'asc' or 'desc'.""")
+@cli_util.option('--sort-by', type=custom_types.CliCaseInsensitiveChoice(["timeCreated", "displayName"]), help=u"""The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending.""")
+@cli_util.option('--all', 'all_pages', is_flag=True, help="""Fetches all pages of results. If you provide this option, then you cannot provide the --limit option.""")
+@cli_util.option('--page-size', type=click.INT, help="""When fetching results, the number of results to fetch per call. Only valid when used with --all or --limit, and ignored otherwise.""")
+@json_skeleton_utils.get_cli_json_input_option({})
+@cli_util.help_option
+@click.pass_context
+@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'ai_language', 'class': 'JobCollection'})
+@cli_util.wrap_exceptions
+def list_jobs(ctx, from_json, all_pages, page_size, compartment_id, lifecycle_state, display_name, id, limit, page, sort_order, sort_by):
+
+ if all_pages and limit:
+ raise click.UsageError('If you provide the --all option you cannot provide the --limit option')
+
+ kwargs = {}
+ if lifecycle_state is not None:
+ kwargs['lifecycle_state'] = lifecycle_state
+ if display_name is not None:
+ kwargs['display_name'] = display_name
+ if id is not None:
+ kwargs['id'] = id
+ if limit is not None:
+ kwargs['limit'] = limit
+ if page is not None:
+ kwargs['page'] = page
+ if sort_order is not None:
+ kwargs['sort_order'] = sort_order
+ if sort_by is not None:
+ kwargs['sort_by'] = sort_by
+ kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
+ client = cli_util.build_client('ai_language', 'ai_service_language', ctx)
+ if all_pages:
+ if page_size:
+ kwargs['limit'] = page_size
+
+ result = cli_util.list_call_get_all_results(
+ client.list_jobs,
+ compartment_id=compartment_id,
+ **kwargs
+ )
+ elif limit is not None:
+ result = cli_util.list_call_get_up_to_limit(
+ client.list_jobs,
+ limit,
+ page_size,
+ compartment_id=compartment_id,
+ **kwargs
+ )
+ else:
+ result = client.list_jobs(
+ compartment_id=compartment_id,
+ **kwargs
+ )
+ cli_util.render_response(result, ctx)
+
+
@model_group.command(name=cli_util.override('ai.list_models.command_name', 'list'), help=u"""Returns a list of models. \n[Command Reference](listModels)""")
@cli_util.option('--compartment-id', required=True, help=u"""The ID of the compartment in which to list resources.""")
@cli_util.option('--model-id', help=u"""unique model OCID.""")
@@ -2922,6 +3355,69 @@ def update_endpoint(ctx, from_json, force, wait_for_state, max_wait_seconds, wai
cli_util.render_response(result, ctx)
+@job_group.command(name=cli_util.override('ai.update_job.command_name', 'update'), help=u"""Updates the language service async Job \n[Command Reference](updateJob)""")
+@cli_util.option('--job-id', required=True, help=u"""Unique Transcription Job identifier.""")
+@cli_util.option('--display-name', help=u"""A user-friendly display name for the job.""")
+@cli_util.option('--description', help=u"""A short description of the job.""")
+@cli_util.option('--if-match', help=u"""For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.""")
+@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "SUCCEEDED", "FAILED", "CANCELING", "CANCELED", "DELETING", "DELETED"]), multiple=True, help="""This operation creates, modifies or deletes a resource that has a defined lifecycle state. Specify this option to perform the action and then wait until the resource reaches a given lifecycle state. Multiple states can be specified, returning on the first state. For example, --wait-for-state SUCCEEDED --wait-for-state FAILED would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.""")
+@cli_util.option('--max-wait-seconds', type=click.INT, help="""The maximum time to wait for the resource to reach the lifecycle state defined by --wait-for-state. Defaults to 1200 seconds.""")
+@cli_util.option('--wait-interval-seconds', type=click.INT, help="""Check every --wait-interval-seconds to see whether the resource has reached the lifecycle state defined by --wait-for-state. Defaults to 30 seconds.""")
+@json_skeleton_utils.get_cli_json_input_option({})
+@cli_util.help_option
+@click.pass_context
+@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'ai_language', 'class': 'Job'})
+@cli_util.wrap_exceptions
+def update_job(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, job_id, display_name, description, if_match):
+
+ if isinstance(job_id, six.string_types) and len(job_id.strip()) == 0:
+ raise click.UsageError('Parameter --job-id cannot be whitespace or empty string')
+
+ kwargs = {}
+ if if_match is not None:
+ kwargs['if_match'] = if_match
+ kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
+
+ _details = {}
+
+ if display_name is not None:
+ _details['displayName'] = display_name
+
+ if description is not None:
+ _details['description'] = description
+
+ client = cli_util.build_client('ai_language', 'ai_service_language', ctx)
+ result = client.update_job(
+ job_id=job_id,
+ update_job_details=_details,
+ **kwargs
+ )
+ if wait_for_state:
+
+ if hasattr(client, 'get_job') and callable(getattr(client, 'get_job')):
+ try:
+ wait_period_kwargs = {}
+ if max_wait_seconds is not None:
+ wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
+ if wait_interval_seconds is not None:
+ wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
+
+ click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
+ result = oci.wait_until(client, client.get_job(result.data.id), 'lifecycle_state', wait_for_state, **wait_period_kwargs)
+ except oci.exceptions.MaximumWaitTimeExceeded as e:
+ # If we fail, we should show an error, but we should still provide the information to the customer
+ click.echo('Failed to wait until the resource entered the specified state. Outputting last known resource state', file=sys.stderr)
+ cli_util.render_response(result, ctx)
+ sys.exit(2)
+ except Exception:
+ click.echo('Encountered error while waiting for resource to enter the specified state. Outputting last known resource state', file=sys.stderr)
+ cli_util.render_response(result, ctx)
+ raise
+ else:
+ click.echo('Unable to wait for the resource to enter the specified state', file=sys.stderr)
+ cli_util.render_response(result, ctx)
+
+
@model_group.command(name=cli_util.override('ai.update_model.command_name', 'update'), help=u"""Updates the model \n[Command Reference](updateModel)""")
@cli_util.option('--model-id', required=True, help=u"""unique model OCID.""")
@cli_util.option('--display-name', help=u"""A user-friendly display name for the resource. It does not have to be unique and can be modified. Avoid entering confidential information.""")
diff --git a/services/ai_language/tests/util/generated/command_to_api.py b/services/ai_language/tests/util/generated/command_to_api.py
index dd83053f0..0536bbcf9 100644
--- a/services/ai_language/tests/util/generated/command_to_api.py
+++ b/services/ai_language/tests/util/generated/command_to_api.py
@@ -9,13 +9,17 @@
"ai.batch_detect_language_sentiments": "oci.ai_language.AIServiceLanguageClient.batch_detect_language_sentiments",
"ai.batch_detect_language_text_classification": "oci.ai_language.AIServiceLanguageClient.batch_detect_language_text_classification",
"ai.batch_language_translation": "oci.ai_language.AIServiceLanguageClient.batch_language_translation",
+ "ai.cancel_job": "oci.ai_language.AIServiceLanguageClient.cancel_job",
"ai.change_endpoint_compartment": "oci.ai_language.AIServiceLanguageClient.change_endpoint_compartment",
+ "ai.change_job_compartment": "oci.ai_language.AIServiceLanguageClient.change_job_compartment",
"ai.change_model_compartment": "oci.ai_language.AIServiceLanguageClient.change_model_compartment",
"ai.change_project_compartment": "oci.ai_language.AIServiceLanguageClient.change_project_compartment",
"ai.create_endpoint": "oci.ai_language.AIServiceLanguageClient.create_endpoint",
+ "ai.create_job": "oci.ai_language.AIServiceLanguageClient.create_job",
"ai.create_model": "oci.ai_language.AIServiceLanguageClient.create_model",
"ai.create_project": "oci.ai_language.AIServiceLanguageClient.create_project",
"ai.delete_endpoint": "oci.ai_language.AIServiceLanguageClient.delete_endpoint",
+ "ai.delete_job": "oci.ai_language.AIServiceLanguageClient.delete_job",
"ai.delete_model": "oci.ai_language.AIServiceLanguageClient.delete_model",
"ai.delete_project": "oci.ai_language.AIServiceLanguageClient.delete_project",
"ai.detect_dominant_language": "oci.ai_language.AIServiceLanguageClient.detect_dominant_language",
@@ -24,18 +28,21 @@
"ai.detect_language_sentiments": "oci.ai_language.AIServiceLanguageClient.detect_language_sentiments",
"ai.detect_language_text_classification": "oci.ai_language.AIServiceLanguageClient.detect_language_text_classification",
"ai.get_endpoint": "oci.ai_language.AIServiceLanguageClient.get_endpoint",
+ "ai.get_job": "oci.ai_language.AIServiceLanguageClient.get_job",
"ai.get_model": "oci.ai_language.AIServiceLanguageClient.get_model",
"ai.get_model_type": "oci.ai_language.AIServiceLanguageClient.get_model_type",
"ai.get_project": "oci.ai_language.AIServiceLanguageClient.get_project",
"ai.get_work_request": "oci.ai_language.AIServiceLanguageClient.get_work_request",
"ai.list_endpoints": "oci.ai_language.AIServiceLanguageClient.list_endpoints",
"ai.list_evaluation_results": "oci.ai_language.AIServiceLanguageClient.list_evaluation_results",
+ "ai.list_jobs": "oci.ai_language.AIServiceLanguageClient.list_jobs",
"ai.list_models": "oci.ai_language.AIServiceLanguageClient.list_models",
"ai.list_projects": "oci.ai_language.AIServiceLanguageClient.list_projects",
"ai.list_work_request_errors": "oci.ai_language.AIServiceLanguageClient.list_work_request_errors",
"ai.list_work_request_logs": "oci.ai_language.AIServiceLanguageClient.list_work_request_logs",
"ai.list_work_requests": "oci.ai_language.AIServiceLanguageClient.list_work_requests",
"ai.update_endpoint": "oci.ai_language.AIServiceLanguageClient.update_endpoint",
+ "ai.update_job": "oci.ai_language.AIServiceLanguageClient.update_job",
"ai.update_model": "oci.ai_language.AIServiceLanguageClient.update_model",
"ai.update_project": "oci.ai_language.AIServiceLanguageClient.update_project",
}
diff --git a/services/apm_traces/src/oci_cli_attributes/__init__.py b/services/apm_traces/src/oci_cli_attributes/__init__.py
new file mode 100644
index 000000000..b66375666
--- /dev/null
+++ b/services/apm_traces/src/oci_cli_attributes/__init__.py
@@ -0,0 +1,4 @@
+# coding: utf-8
+# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved.
+# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license.
+# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20200630
diff --git a/services/apm_traces/src/oci_cli_attributes/attributes_cli_extended.py b/services/apm_traces/src/oci_cli_attributes/attributes_cli_extended.py
new file mode 100644
index 000000000..900c9e3df
--- /dev/null
+++ b/services/apm_traces/src/oci_cli_attributes/attributes_cli_extended.py
@@ -0,0 +1,233 @@
+# Copyright (c) 2016, 2023, Oracle and/or its affiliates.
+#
+# This software is dual-licensed to you under the Universal Permissive License
+# (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl and Apache License
+# 2.0 as shown at https://www.apache.org/licenses/LICENSE-2.0. You may choose
+# either license.
+#
+# If you elect to accept the software under the Apache License, Version 2.0,
+# the following applies:
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# coding: utf-8
+import click # noqa: F401
+import json # noqa: F401
+from services.apm_traces.src.oci_cli_attributes.generated import attributes_cli
+from oci_cli import cli_util # noqa: F401
+from oci_cli import custom_types # noqa: F401
+from oci_cli import json_skeleton_utils # noqa: F401
+
+
+# oci apm-traces attributes bulk-activation-status bulk-activate-attribute -> oci apm-traces attributes bulk-activation-status activate
+cli_util.rename_command(attributes_cli, attributes_cli.bulk_activation_status_group, attributes_cli.bulk_activate_attribute, "activate")
+
+
+# oci apm-traces attributes bulk-de-activation-status bulk-de-activate-attribute -> oci apm-traces attributes bulk-de-activation-status deactivate
+cli_util.rename_command(attributes_cli, attributes_cli.bulk_de_activation_status_group, attributes_cli.bulk_de_activate_attribute, "deactivate")
+
+
+# oci apm-traces attributes bulk-pin-status bulk-pin-attribute -> oci apm-traces attributes bulk-pin-status pin
+cli_util.rename_command(attributes_cli, attributes_cli.bulk_pin_status_group, attributes_cli.bulk_pin_attribute, "pin")
+
+
+# oci apm-traces attributes bulk-unpin-status bulk-unpin-attribute -> oci apm-traces attributes bulk-unpin-status unpin
+cli_util.rename_command(attributes_cli, attributes_cli.bulk_unpin_status_group, attributes_cli.bulk_unpin_attribute, "unpin")
+
+
+# oci apm-traces attributes bulk-update-notes-status bulk-update-attribute-notes -> oci apm-traces attributes bulk-update-notes-status update-notes
+cli_util.rename_command(attributes_cli, attributes_cli.bulk_update_notes_status_group, attributes_cli.bulk_update_attribute_notes, "update-notes")
+
+
+# oci apm-traces attributes auto-activate-status get-status-auto-activate -> oci apm-traces attributes auto-activate-status auto-activate-status
+cli_util.rename_command(attributes_cli, attributes_cli.auto_activate_status_group, attributes_cli.get_status_auto_activate, "auto-activate-status")
+
+
+# oci apm-traces attributes auto-activate-toggle-status put-toggle-auto-activate -> oci apm-traces attributes auto-activate-toggle-status update-auto-activate
+cli_util.rename_command(attributes_cli, attributes_cli.auto_activate_toggle_status_group, attributes_cli.put_toggle_auto_activate, "update-auto-activate")
+
+# oci apm-traces attributes bulk-update-attribute-status bulk-update-attribute -> oci apm-traces attributes update-attribute
+cli_util.rename_command(attributes_cli, attributes_cli.bulk_update_attribute_status_group, attributes_cli.bulk_update_attribute, "update-attribute")
+
+
+# Move commands under 'oci apm-traces attributes auto-activate-status' -> 'oci apm-traces attributes'
+attributes_cli.attributes_root_group.commands.pop(attributes_cli.auto_activate_status_group.name)
+attributes_cli.attributes_root_group.add_command(attributes_cli.get_status_auto_activate)
+
+
+# Move commands under 'oci apm-traces attributes auto-activate-toggle-status' -> 'oci apm-traces attributes'
+attributes_cli.attributes_root_group.commands.pop(attributes_cli.auto_activate_toggle_status_group.name)
+attributes_cli.attributes_root_group.add_command(attributes_cli.put_toggle_auto_activate)
+
+
+# Move commands under 'oci apm-traces attributes bulk-activation-status' -> 'oci apm-traces attributes'
+attributes_cli.attributes_root_group.commands.pop(attributes_cli.bulk_activation_status_group.name)
+attributes_cli.attributes_root_group.add_command(attributes_cli.bulk_activate_attribute)
+
+
+# Move commands under 'oci apm-traces attributes bulk-de-activation-status' -> 'oci apm-traces attributes'
+attributes_cli.attributes_root_group.commands.pop(attributes_cli.bulk_de_activation_status_group.name)
+attributes_cli.attributes_root_group.add_command(attributes_cli.bulk_de_activate_attribute)
+
+
+# Move commands under 'oci apm-traces attributes bulk-pin-status' -> 'oci apm-traces attributes'
+attributes_cli.attributes_root_group.commands.pop(attributes_cli.bulk_pin_status_group.name)
+attributes_cli.attributes_root_group.add_command(attributes_cli.bulk_pin_attribute)
+
+
+# Move commands under 'oci apm-traces attributes bulk-unpin-status' -> 'oci apm-traces attributes'
+attributes_cli.attributes_root_group.commands.pop(attributes_cli.bulk_unpin_status_group.name)
+attributes_cli.attributes_root_group.add_command(attributes_cli.bulk_unpin_attribute)
+
+
+# Move commands under 'oci apm-traces attributes bulk-update-notes-status' -> 'oci apm-traces attributes'
+attributes_cli.attributes_root_group.commands.pop(attributes_cli.bulk_update_notes_status_group.name)
+attributes_cli.attributes_root_group.add_command(attributes_cli.bulk_update_attribute_notes)
+
+# Move commands under 'oci apm-traces attributes bulk-update-attribute-status' -> 'oci apm-traces attributes'
+attributes_cli.attributes_root_group.commands.pop(attributes_cli.bulk_update_attribute_status_group.name)
+attributes_cli.attributes_root_group.add_command(attributes_cli.bulk_update_attribute)
+
+
+@cli_util.copy_params_from_generated_command(attributes_cli.put_toggle_auto_activate, params_to_exclude=['apm_domain_id', 'data_key_type', 'is_auto_activate_on'])
+@attributes_cli.attributes_root_group.command(name=attributes_cli.put_toggle_auto_activate.name, help=attributes_cli.put_toggle_auto_activate.help)
+@cli_util.option('--apm-domain-id', required=True, help=u"""The APM Domain ID for the intended request. [required]""")
+@cli_util.option('--data-key-type', required=True, type=custom_types.CliCaseInsensitiveChoice(["PRIVATE_DATA_KEY", "PUBLIC_DATA_KEY"]), help=u"""Data key type for which auto-activate needs to be turned on or off. [required]""")
+@cli_util.option('--auto-activate-value', required=True, type=click.BOOL, help=u"""Auto activate toggle switch. Set to true to turn on auto-activate. Set to false to turn off auto-activate. [required]""")
+@click.pass_context
+@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'apm_traces', 'class': 'AutoActivateToggleStatus'})
+@cli_util.wrap_exceptions
+def put_toggle_auto_activate_extended(ctx, **kwargs):
+
+ if 'auto_activate_value' in kwargs:
+ kwargs['is_auto_activate_on'] = kwargs['auto_activate_value']
+ kwargs.pop('auto_activate_value')
+
+ ctx.invoke(attributes_cli.put_toggle_auto_activate, **kwargs)
+
+
+@cli_util.copy_params_from_generated_command(attributes_cli.bulk_activate_attribute, params_to_exclude=['attribute_details'])
+@attributes_cli.attributes_root_group.command(name=attributes_cli.bulk_activate_attribute.name, help=attributes_cli.bulk_activate_attribute.help)
+@cli_util.option('--attribute-details', required=True, type=custom_types.CLI_COMPLEX_TYPE, help=u"""Collection of objects containing the details about individual attribute to be activated.
+
+This option is a JSON list with items of type BulkActivateAttributeDetail. For documentation on BulkActivateAttributeDetail please see our API reference: https://docs.cloud.oracle.com/api/#/en/attributes/20200630/datatypes/BulkActivateAttributeDetail.
+[
+ {
+ "attributeName": "",
+ "attributeType": "",
+ "attributeNamespace": "",
+ "unit":""
+ }
+]
+""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
+@click.pass_context
+@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'attribute-details': {'module': 'apm_traces', 'class': 'list[BulkActivateAttributeDetail]'}}, output_type={'module': 'apm_traces', 'class': 'BulkActivationStatus'})
+@cli_util.wrap_exceptions
+def bulk_activate_attribute_extended(ctx, **kwargs):
+ ctx.invoke(attributes_cli.bulk_activate_attribute, **kwargs)
+
+
+@cli_util.copy_params_from_generated_command(attributes_cli.bulk_de_activate_attribute, params_to_exclude=['attribute_details'])
+@attributes_cli.attributes_root_group.command(name=attributes_cli.bulk_de_activate_attribute.name, help=attributes_cli.bulk_de_activate_attribute.help)
+@cli_util.option('--attribute-details', required=True, type=custom_types.CLI_COMPLEX_TYPE, help=u"""Collection of objects containing the details about individual attribute to be de-activated.
+
+This option is a JSON list with items of type BulkDeActivateAttributeDetail. For documentation on BulkDeActivateAttributeDetail please see our API reference: https://docs.cloud.oracle.com/api/#/en/attributes/20200630/datatypes/BulkDeActivateAttributeDetail.
+[
+ {
+ "attributeName": "",
+ "attributeNamespace": ""
+ }
+]
+""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
+@click.pass_context
+@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'attribute-details': {'module': 'apm_traces', 'class': 'list[BulkDeActivateAttributeDetail]'}}, output_type={'module': 'apm_traces', 'class': 'BulkDeActivationStatus'})
+@cli_util.wrap_exceptions
+def bulk_de_activate_attribute_extended(ctx, **kwargs):
+ ctx.invoke(attributes_cli.bulk_de_activate_attribute, **kwargs)
+
+
+@cli_util.copy_params_from_generated_command(attributes_cli.bulk_pin_attribute, params_to_exclude=['attribute_details'])
+@attributes_cli.attributes_root_group.command(name=attributes_cli.bulk_pin_attribute.name, help=attributes_cli.bulk_pin_attribute.help)
+@cli_util.option('--attribute-details', required=True, type=custom_types.CLI_COMPLEX_TYPE, help=u"""Collection of objects containing the details about individual attribute to be pinned.
+
+This option is a JSON list with items of type BulkPinAttributeDetail. For documentation on BulkPinAttributeDetail please see our API reference: https://docs.cloud.oracle.com/api/#/en/attributes/20200630/datatypes/BulkPinAttributeDetail.
+[
+ {
+ "attributeName": "",
+ "attributeNamespace": ""
+ }
+]
+.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
+@click.pass_context
+@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'attribute-details': {'module': 'apm_traces', 'class': 'list[BulkPinAttributeDetail]'}}, output_type={'module': 'apm_traces', 'class': 'BulkPinStatus'})
+@cli_util.wrap_exceptions
+def bulk_pin_attribute_extended(ctx, **kwargs):
+ ctx.invoke(attributes_cli.bulk_pin_attribute, **kwargs)
+
+
+@cli_util.copy_params_from_generated_command(attributes_cli.bulk_unpin_attribute, params_to_exclude=['attribute_details'])
+@attributes_cli.attributes_root_group.command(name=attributes_cli.bulk_unpin_attribute.name, help=attributes_cli.bulk_unpin_attribute.help)
+@cli_util.option('--attribute-details', required=True, type=custom_types.CLI_COMPLEX_TYPE, help=u"""Collection of objects containing the details about individual attribute to be un-pinned.
+
+This option is a JSON list with items of type BulkUnpinAttributeDetail. For documentation on BulkUnpinAttributeDetail please see our API reference: https://docs.cloud.oracle.com/api/#/en/attributes/20200630/datatypes/BulkUnpinAttributeDetail.
+[
+ {
+ "attributeName": "",
+ "attributeNamespace": ""
+ }
+]
+.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
+@click.pass_context
+@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'attribute-details': {'module': 'apm_traces', 'class': 'list[BulkUnpinAttributeDetail]'}}, output_type={'module': 'apm_traces', 'class': 'BulkUnpinStatus'})
+@cli_util.wrap_exceptions
+def bulk_unpin_attribute_extended(ctx, **kwargs):
+ ctx.invoke(attributes_cli.bulk_unpin_attribute, **kwargs)
+
+
+@cli_util.copy_params_from_generated_command(attributes_cli.bulk_update_attribute_notes, params_to_exclude=['attribute_details'])
+@attributes_cli.attributes_root_group.command(name=attributes_cli.bulk_update_attribute_notes.name, help=attributes_cli.bulk_update_attribute_notes.help)
+@cli_util.option('--attribute-details', required=True, type=custom_types.CLI_COMPLEX_TYPE, help=u"""Collection of objects containing the details about individual attribute for which notes are to be updated.
+
+This option is a JSON list with items of type BulkUpdateAttributeNotesDetail. For documentation on BulkUpdateAttributeNotesDetail please see our API reference: https://docs.cloud.oracle.com/api/#/en/attributes/20200630/datatypes/BulkUpdateAttributeNotesDetail.
+[
+ {
+ "attributeName": "",
+ "notes" : "",
+ "attributeNamespace": ""
+ }
+]
+.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
+@click.pass_context
+@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'attribute-details': {'module': 'apm_traces', 'class': 'list[BulkUpdateAttributeNotesDetail]'}}, output_type={'module': 'apm_traces', 'class': 'BulkUpdateNotesStatus'})
+@cli_util.wrap_exceptions
+def bulk_update_attribute_notes_extended(ctx, **kwargs):
+ ctx.invoke(attributes_cli.bulk_update_attribute_notes, **kwargs)
+
+
+@cli_util.copy_params_from_generated_command(attributes_cli.bulk_update_attribute, params_to_exclude=['attribute_details'])
+@attributes_cli.attributes_root_group.command(name=attributes_cli.bulk_update_attribute.name, help=attributes_cli.bulk_update_attribute.help)
+@cli_util.option('--attribute-details', required=True, type=custom_types.CLI_COMPLEX_TYPE, help=u"""Collection of objects containing the details about individual attribute for which unit is to be updated.
+
+This option is a JSON list with items of type BulkUpdateAttributeDetail. For documentation on BulkUpdateAttributeDetail please see our API reference: https://docs.cloud.oracle.com/api/#/en/attributes/20200630/datatypes/BulkUpdateAttributeDetail.
+[
+ {
+ "attributeName": "",
+ "unit":"",
+ "attributeNamespace": ""
+ }
+]
+.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
+@click.pass_context
+@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'attribute-details': {'module': 'apm_traces', 'class': 'list[BulkUpdateAttributeDetail]'}}, output_type={'module': 'apm_traces', 'class': 'BulkUpdateAttributeStatus'})
+@cli_util.wrap_exceptions
+def bulk_update_attribute_extended(ctx, **kwargs):
+ ctx.invoke(attributes_cli.bulk_update_attribute, **kwargs)
diff --git a/services/apm_traces/src/oci_cli_attributes/generated/__init__.py b/services/apm_traces/src/oci_cli_attributes/generated/__init__.py
new file mode 100644
index 000000000..b66375666
--- /dev/null
+++ b/services/apm_traces/src/oci_cli_attributes/generated/__init__.py
@@ -0,0 +1,4 @@
+# coding: utf-8
+# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved.
+# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license.
+# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20200630
diff --git a/services/apm_traces/src/oci_cli_attributes/generated/attributes_cli.py b/services/apm_traces/src/oci_cli_attributes/generated/attributes_cli.py
new file mode 100644
index 000000000..7ee6fcd30
--- /dev/null
+++ b/services/apm_traces/src/oci_cli_attributes/generated/attributes_cli.py
@@ -0,0 +1,299 @@
+# coding: utf-8
+# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved.
+# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license.
+# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20200630
+
+from __future__ import print_function
+import click
+import oci # noqa: F401
+import six # noqa: F401
+import sys # noqa: F401
+from oci_cli import cli_constants # noqa: F401
+from oci_cli import cli_util
+from oci_cli import json_skeleton_utils
+from oci_cli import custom_types # noqa: F401
+from oci_cli.aliasing import CommandGroupWithAlias
+from services.apm_traces.src.oci_cli_apm_traces.generated import apm_traces_service_cli
+
+
+@click.command(cli_util.override('attributes.attributes_root_group.command_name', 'attributes'), cls=CommandGroupWithAlias, help=cli_util.override('attributes.attributes_root_group.help', """Use the Application Performance Monitoring Trace Explorer API to query traces and associated spans in Trace Explorer. For more information, see [Application Performance Monitoring]."""), short_help=cli_util.override('attributes.attributes_root_group.short_help', """Application Performance Monitoring Trace Explorer API"""))
+@cli_util.help_option_group
+def attributes_root_group():
+ pass
+
+
+@click.command(cli_util.override('attributes.auto_activate_status_group.command_name', 'auto-activate-status'), cls=CommandGroupWithAlias, help="""Status of autoactivation for the given data key in the APM Domain.""")
+@cli_util.help_option_group
+def auto_activate_status_group():
+ pass
+
+
+@click.command(cli_util.override('attributes.auto_activate_toggle_status_group.command_name', 'auto-activate-toggle-status'), cls=CommandGroupWithAlias, help="""Response of a auto-activate toggle operation.""")
+@cli_util.help_option_group
+def auto_activate_toggle_status_group():
+ pass
+
+
+@click.command(cli_util.override('attributes.bulk_update_attribute_status_group.command_name', 'bulk-update-attribute-status'), cls=CommandGroupWithAlias, help="""Response of a bulk update attribute operation.""")
+@cli_util.help_option_group
+def bulk_update_attribute_status_group():
+ pass
+
+
+@click.command(cli_util.override('attributes.bulk_pin_status_group.command_name', 'bulk-pin-status'), cls=CommandGroupWithAlias, help="""Response of a bulk attribute pin operation.""")
+@cli_util.help_option_group
+def bulk_pin_status_group():
+ pass
+
+
+@click.command(cli_util.override('attributes.bulk_update_notes_status_group.command_name', 'bulk-update-notes-status'), cls=CommandGroupWithAlias, help="""Response of a bulk update notes operation.""")
+@cli_util.help_option_group
+def bulk_update_notes_status_group():
+ pass
+
+
+@click.command(cli_util.override('attributes.bulk_activation_status_group.command_name', 'bulk-activation-status'), cls=CommandGroupWithAlias, help="""Response of a bulk attribute activation operation.""")
+@cli_util.help_option_group
+def bulk_activation_status_group():
+ pass
+
+
+@click.command(cli_util.override('attributes.bulk_unpin_status_group.command_name', 'bulk-unpin-status'), cls=CommandGroupWithAlias, help="""Response of a bulk attribute unpin operation.""")
+@cli_util.help_option_group
+def bulk_unpin_status_group():
+ pass
+
+
+@click.command(cli_util.override('attributes.bulk_de_activation_status_group.command_name', 'bulk-de-activation-status'), cls=CommandGroupWithAlias, help="""Response of a bulk attribute deactivation operation.""")
+@cli_util.help_option_group
+def bulk_de_activation_status_group():
+ pass
+
+
+apm_traces_service_cli.apm_traces_service_group.add_command(attributes_root_group)
+attributes_root_group.add_command(auto_activate_status_group)
+attributes_root_group.add_command(auto_activate_toggle_status_group)
+attributes_root_group.add_command(bulk_update_attribute_status_group)
+attributes_root_group.add_command(bulk_pin_status_group)
+attributes_root_group.add_command(bulk_update_notes_status_group)
+attributes_root_group.add_command(bulk_activation_status_group)
+attributes_root_group.add_command(bulk_unpin_status_group)
+attributes_root_group.add_command(bulk_de_activation_status_group)
+
+
+@bulk_activation_status_group.command(name=cli_util.override('attributes.bulk_activate_attribute.command_name', 'bulk-activate-attribute'), help=u"""Activates a set of attributes for the given APM Domain. The API is not case-sensitive. Any duplicates present in the bulk activation request are deduplicated and only unique attributes are activated. A maximum number of 700 string attributes and 100 numeric attributes can be activated in an APM Domain subject to the available string and numeric slots. Once an attribute has been activated, it may take sometime for it to be appear in searches as ingest might not have picked up the changes or any associated caches might not have refreshed. The bulk activation operation is atomic, and the operation succeeds only if all the attributes in the request have been processed successfully and they get a success status back. If the processing of any attribute results in a processing or validation error, then none of the attributes in the bulk request are activated. Attributes that are activated are unpinned by default if they are pinned. \n[Command Reference](bulkActivateAttribute)""")
+@cli_util.option('--apm-domain-id', required=True, help=u"""The APM Domain ID for the intended request.""")
+@cli_util.option('--attribute-details', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Collection of objects containing the details about individual attribute to be activated.
+
+This option is a JSON list with items of type BulkActivateAttributeDetail. For documentation on BulkActivateAttributeDetail please see our API reference: https://docs.cloud.oracle.com/api/#/en/attributes/20200630/datatypes/BulkActivateAttributeDetail.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
+@json_skeleton_utils.get_cli_json_input_option({'attribute-details': {'module': 'apm_traces', 'class': 'list[BulkActivateAttributeDetail]'}})
+@cli_util.help_option
+@click.pass_context
+@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'attribute-details': {'module': 'apm_traces', 'class': 'list[BulkActivateAttributeDetail]'}}, output_type={'module': 'apm_traces', 'class': 'BulkActivationStatus'})
+@cli_util.wrap_exceptions
+def bulk_activate_attribute(ctx, from_json, apm_domain_id, attribute_details):
+
+ kwargs = {}
+ kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
+
+ _details = {}
+
+ if attribute_details is not None:
+ _details['attributeDetails'] = cli_util.parse_json_parameter("attribute_details", attribute_details)
+
+ client = cli_util.build_client('apm_traces', 'attributes', ctx)
+ result = client.bulk_activate_attribute(
+ apm_domain_id=apm_domain_id,
+ bulk_activate_attribute_details=_details,
+ **kwargs
+ )
+ cli_util.render_response(result, ctx)
+
+
+@bulk_de_activation_status_group.command(name=cli_util.override('attributes.bulk_de_activate_attribute.command_name', 'bulk-de-activate-attribute'), help=u"""Deactivates a set of attributes for the given APM Domain. The API is case in-sensitive. Any duplicates present in the bulk deactivation request are deduplicated and only unique attributes are deactivated. A maximum number of 700 string attributes and 100 numeric attributes can be deactivated in an APM Domain subject to the available string and numeric slots. Out of box attributes (Trace and Span) cannot be deactivated, and will result in a processing error. Once an attribute has been deactivated, it may take sometime for it to disappear in searches as ingest might not have picked up the changes or any associated caches might not have refreshed. The bulk deactivation operation is atomic, and the operation succeeds only if all the attributes in the request have been processed successfully and they get a success status back. If the processing of any attribute results in a processing or validation error, then none of the attributes in the bulk request are deactivated. \n[Command Reference](bulkDeActivateAttribute)""")
+@cli_util.option('--apm-domain-id', required=True, help=u"""The APM Domain ID for the intended request.""")
+@cli_util.option('--attribute-details', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Collection of objects containing the details about individual attribute to be deactivated.
+
+This option is a JSON list with items of type BulkDeActivateAttributeDetail. For documentation on BulkDeActivateAttributeDetail please see our API reference: https://docs.cloud.oracle.com/api/#/en/attributes/20200630/datatypes/BulkDeActivateAttributeDetail.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
+@json_skeleton_utils.get_cli_json_input_option({'attribute-details': {'module': 'apm_traces', 'class': 'list[BulkDeActivateAttributeDetail]'}})
+@cli_util.help_option
+@click.pass_context
+@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'attribute-details': {'module': 'apm_traces', 'class': 'list[BulkDeActivateAttributeDetail]'}}, output_type={'module': 'apm_traces', 'class': 'BulkDeActivationStatus'})
+@cli_util.wrap_exceptions
+def bulk_de_activate_attribute(ctx, from_json, apm_domain_id, attribute_details):
+
+ kwargs = {}
+ kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
+
+ _details = {}
+
+ if attribute_details is not None:
+ _details['attributeDetails'] = cli_util.parse_json_parameter("attribute_details", attribute_details)
+
+ client = cli_util.build_client('apm_traces', 'attributes', ctx)
+ result = client.bulk_de_activate_attribute(
+ apm_domain_id=apm_domain_id,
+ bulk_de_activate_attribute_details=_details,
+ **kwargs
+ )
+ cli_util.render_response(result, ctx)
+
+
+@bulk_pin_status_group.command(name=cli_util.override('attributes.bulk_pin_attribute.command_name', 'bulk-pin-attribute'), help=u"""Pin a set of attributes in the APM Domain. Attributes that are marked pinned are not autoactivated by ingest. Attributes that are deactivated are pinned by default. \n[Command Reference](bulkPinAttribute)""")
+@cli_util.option('--apm-domain-id', required=True, help=u"""The APM Domain ID for the intended request.""")
+@cli_util.option('--attribute-details', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Collection of objects containing the details about individual attribute to be pinned.
+
+This option is a JSON list with items of type BulkPinAttributeDetail. For documentation on BulkPinAttributeDetail please see our API reference: https://docs.cloud.oracle.com/api/#/en/attributes/20200630/datatypes/BulkPinAttributeDetail.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
+@json_skeleton_utils.get_cli_json_input_option({'attribute-details': {'module': 'apm_traces', 'class': 'list[BulkPinAttributeDetail]'}})
+@cli_util.help_option
+@click.pass_context
+@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'attribute-details': {'module': 'apm_traces', 'class': 'list[BulkPinAttributeDetail]'}}, output_type={'module': 'apm_traces', 'class': 'BulkPinStatus'})
+@cli_util.wrap_exceptions
+def bulk_pin_attribute(ctx, from_json, apm_domain_id, attribute_details):
+
+ kwargs = {}
+ kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
+
+ _details = {}
+
+ if attribute_details is not None:
+ _details['attributeDetails'] = cli_util.parse_json_parameter("attribute_details", attribute_details)
+
+ client = cli_util.build_client('apm_traces', 'attributes', ctx)
+ result = client.bulk_pin_attribute(
+ apm_domain_id=apm_domain_id,
+ bulk_pin_attribute_details=_details,
+ **kwargs
+ )
+ cli_util.render_response(result, ctx)
+
+
+@bulk_unpin_status_group.command(name=cli_util.override('attributes.bulk_unpin_attribute.command_name', 'bulk-unpin-attribute'), help=u"""Unpin a set of attributes in the APM Domain. \n[Command Reference](bulkUnpinAttribute)""")
+@cli_util.option('--apm-domain-id', required=True, help=u"""The APM Domain ID for the intended request.""")
+@cli_util.option('--attribute-details', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Collection of objects containing the details about individual attribute to be unpinned.
+
+This option is a JSON list with items of type BulkUnpinAttributeDetail. For documentation on BulkUnpinAttributeDetail please see our API reference: https://docs.cloud.oracle.com/api/#/en/attributes/20200630/datatypes/BulkUnpinAttributeDetail.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
+@json_skeleton_utils.get_cli_json_input_option({'attribute-details': {'module': 'apm_traces', 'class': 'list[BulkUnpinAttributeDetail]'}})
+@cli_util.help_option
+@click.pass_context
+@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'attribute-details': {'module': 'apm_traces', 'class': 'list[BulkUnpinAttributeDetail]'}}, output_type={'module': 'apm_traces', 'class': 'BulkUnpinStatus'})
+@cli_util.wrap_exceptions
+def bulk_unpin_attribute(ctx, from_json, apm_domain_id, attribute_details):
+
+ kwargs = {}
+ kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
+
+ _details = {}
+
+ if attribute_details is not None:
+ _details['attributeDetails'] = cli_util.parse_json_parameter("attribute_details", attribute_details)
+
+ client = cli_util.build_client('apm_traces', 'attributes', ctx)
+ result = client.bulk_unpin_attribute(
+ apm_domain_id=apm_domain_id,
+ bulk_unpin_attribute_details=_details,
+ **kwargs
+ )
+ cli_util.render_response(result, ctx)
+
+
+@bulk_update_attribute_status_group.command(name=cli_util.override('attributes.bulk_update_attribute.command_name', 'bulk-update-attribute'), help=u"""Update a set of attribute properties in the APM Domain. \n[Command Reference](bulkUpdateAttribute)""")
+@cli_util.option('--apm-domain-id', required=True, help=u"""The APM Domain ID for the intended request.""")
+@cli_util.option('--attribute-details', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Collection of objects containing the details about individual attribute for which properties are to be updated.
+
+This option is a JSON list with items of type BulkUpdateAttributeDetail. For documentation on BulkUpdateAttributeDetail please see our API reference: https://docs.cloud.oracle.com/api/#/en/attributes/20200630/datatypes/BulkUpdateAttributeDetail.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
+@json_skeleton_utils.get_cli_json_input_option({'attribute-details': {'module': 'apm_traces', 'class': 'list[BulkUpdateAttributeDetail]'}})
+@cli_util.help_option
+@click.pass_context
+@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'attribute-details': {'module': 'apm_traces', 'class': 'list[BulkUpdateAttributeDetail]'}}, output_type={'module': 'apm_traces', 'class': 'BulkUpdateAttributeStatus'})
+@cli_util.wrap_exceptions
+def bulk_update_attribute(ctx, from_json, apm_domain_id, attribute_details):
+
+ kwargs = {}
+ kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
+
+ _details = {}
+
+ if attribute_details is not None:
+ _details['attributeDetails'] = cli_util.parse_json_parameter("attribute_details", attribute_details)
+
+ client = cli_util.build_client('apm_traces', 'attributes', ctx)
+ result = client.bulk_update_attribute(
+ apm_domain_id=apm_domain_id,
+ bulk_update_attribute_details=_details,
+ **kwargs
+ )
+ cli_util.render_response(result, ctx)
+
+
+@bulk_update_notes_status_group.command(name=cli_util.override('attributes.bulk_update_attribute_notes.command_name', 'bulk-update-attribute-notes'), help=u"""Add or edit notes to a set of attributes in the APM Domain. Notes can be added to either an active or an inactive attribute. The notes will be preserved even if the attribute changes state (when an active attribute is deactivated or when an inactive attribute is activated). \n[Command Reference](bulkUpdateAttributeNotes)""")
+@cli_util.option('--apm-domain-id', required=True, help=u"""The APM Domain ID for the intended request.""")
+@cli_util.option('--attribute-details', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Collection of objects containing the details about individual attribute for which notes are to be updated.
+
+This option is a JSON list with items of type BulkUpdateAttributeNotesDetail. For documentation on BulkUpdateAttributeNotesDetail please see our API reference: https://docs.cloud.oracle.com/api/#/en/attributes/20200630/datatypes/BulkUpdateAttributeNotesDetail.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
+@json_skeleton_utils.get_cli_json_input_option({'attribute-details': {'module': 'apm_traces', 'class': 'list[BulkUpdateAttributeNotesDetail]'}})
+@cli_util.help_option
+@click.pass_context
+@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'attribute-details': {'module': 'apm_traces', 'class': 'list[BulkUpdateAttributeNotesDetail]'}}, output_type={'module': 'apm_traces', 'class': 'BulkUpdateNotesStatus'})
+@cli_util.wrap_exceptions
+def bulk_update_attribute_notes(ctx, from_json, apm_domain_id, attribute_details):
+
+ kwargs = {}
+ kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
+
+ _details = {}
+
+ if attribute_details is not None:
+ _details['attributeDetails'] = cli_util.parse_json_parameter("attribute_details", attribute_details)
+
+ client = cli_util.build_client('apm_traces', 'attributes', ctx)
+ result = client.bulk_update_attribute_notes(
+ apm_domain_id=apm_domain_id,
+ bulk_update_attribute_notes_details=_details,
+ **kwargs
+ )
+ cli_util.render_response(result, ctx)
+
+
+@auto_activate_status_group.command(name=cli_util.override('attributes.get_status_auto_activate.command_name', 'get-status-auto-activate'), help=u"""Get autoactivation status for a private data key or public data key in the APM Domain. \n[Command Reference](getStatusAutoActivate)""")
+@cli_util.option('--apm-domain-id', required=True, help=u"""The APM Domain ID for the intended request.""")
+@cli_util.option('--data-key-type', required=True, type=custom_types.CliCaseInsensitiveChoice(["PRIVATE_DATA_KEY", "PUBLIC_DATA_KEY"]), help=u"""Data key type for which auto-activate needs to be turned on or off.""")
+@json_skeleton_utils.get_cli_json_input_option({})
+@cli_util.help_option
+@click.pass_context
+@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'apm_traces', 'class': 'AutoActivateStatus'})
+@cli_util.wrap_exceptions
+def get_status_auto_activate(ctx, from_json, apm_domain_id, data_key_type):
+
+ kwargs = {}
+ kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
+ client = cli_util.build_client('apm_traces', 'attributes', ctx)
+ result = client.get_status_auto_activate(
+ apm_domain_id=apm_domain_id,
+ data_key_type=data_key_type,
+ **kwargs
+ )
+ cli_util.render_response(result, ctx)
+
+
+@auto_activate_toggle_status_group.command(name=cli_util.override('attributes.put_toggle_auto_activate.command_name', 'put-toggle-auto-activate'), help=u"""Turn on or off autoactivate for private data key or public data key traffic a given APM Domain. \n[Command Reference](putToggleAutoActivate)""")
+@cli_util.option('--apm-domain-id', required=True, help=u"""The APM Domain ID for the intended request.""")
+@cli_util.option('--is-auto-activate-on', required=True, type=click.BOOL, help=u"""Autoactivate toggle switch. Set to true to turn on auto-activate. Set to false to turn off auto-activate.""")
+@cli_util.option('--data-key-type', required=True, type=custom_types.CliCaseInsensitiveChoice(["PRIVATE_DATA_KEY", "PUBLIC_DATA_KEY"]), help=u"""Data key type for which auto-activate needs to be turned on or off.""")
+@json_skeleton_utils.get_cli_json_input_option({})
+@cli_util.help_option
+@click.pass_context
+@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'apm_traces', 'class': 'AutoActivateToggleStatus'})
+@cli_util.wrap_exceptions
+def put_toggle_auto_activate(ctx, from_json, apm_domain_id, is_auto_activate_on, data_key_type):
+
+ kwargs = {}
+ kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
+ client = cli_util.build_client('apm_traces', 'attributes', ctx)
+ result = client.put_toggle_auto_activate(
+ apm_domain_id=apm_domain_id,
+ is_auto_activate_on=is_auto_activate_on,
+ data_key_type=data_key_type,
+ **kwargs
+ )
+ cli_util.render_response(result, ctx)
diff --git a/services/apm_traces/src/oci_cli_attributes/generated/client_mappings.py b/services/apm_traces/src/oci_cli_attributes/generated/client_mappings.py
new file mode 100644
index 000000000..134ff24d2
--- /dev/null
+++ b/services/apm_traces/src/oci_cli_attributes/generated/client_mappings.py
@@ -0,0 +1,14 @@
+# coding: utf-8
+# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved.
+# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license.
+# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20200630
+
+import oci
+from oci_cli.cli_clients import CLIENT_MAP
+from oci_cli.cli_clients import MODULE_TO_TYPE_MAPPINGS
+from oci.apm_traces import AttributesClient
+
+MODULE_TO_TYPE_MAPPINGS["apm_traces"] = oci.apm_traces.models.apm_traces_type_mapping
+if CLIENT_MAP.get("apm_traces") is None:
+ CLIENT_MAP["apm_traces"] = {}
+CLIENT_MAP["apm_traces"]["attributes"] = AttributesClient
diff --git a/services/apm_traces/src/oci_cli_query/generated/query_cli.py b/services/apm_traces/src/oci_cli_query/generated/query_cli.py
index a99b3184a..57d89b94a 100644
--- a/services/apm_traces/src/oci_cli_query/generated/query_cli.py
+++ b/services/apm_traces/src/oci_cli_query/generated/query_cli.py
@@ -40,9 +40,9 @@ def quick_pick_summary_group():
@quick_pick_summary_group.command(name=cli_util.override('query.list_quick_picks.command_name', 'list-quick-picks'), help=u"""Returns a list of predefined Quick Pick queries intended to assist the user to choose a query to run. There is no sorting applied on the results. \n[Command Reference](listQuickPicks)""")
-@cli_util.option('--apm-domain-id', required=True, help=u"""The APM Domain ID the request is intended for.""")
+@cli_util.option('--apm-domain-id', required=True, help=u"""The APM Domain ID for the intended request.""")
@cli_util.option('--limit', type=click.INT, help=u"""The maximum number of items to return.""")
-@cli_util.option('--page', help=u"""The page token representing the page at which to start retrieving results. This is usually retrieved from a previous response.""")
+@cli_util.option('--page', help=u"""The page token representing the page where to start retrieving results. This is usually retrieved from a previous response.""")
@cli_util.option('--all', 'all_pages', is_flag=True, help="""Fetches all pages of results. If you provide this option, then you cannot provide the --limit option.""")
@cli_util.option('--page-size', type=click.INT, help="""When fetching results, the number of results to fetch per call. Only valid when used with --all or --limit, and ignored otherwise.""")
@json_skeleton_utils.get_cli_json_input_option({})
@@ -88,12 +88,12 @@ def list_quick_picks(ctx, from_json, all_pages, page_size, apm_domain_id, limit,
@query_result_response_group.command(name=cli_util.override('query.query.command_name', 'query'), help=u"""Retrieves the results (selected attributes and aggregations) of a query constructed according to the Application Performance Monitoring Defined Query Syntax. Query results are filtered by the filter criteria specified in the where clause. Further query results are grouped by the attributes specified in the group by clause. Finally, ordering (asc/desc) is done by the specified attributes in the order by clause. \n[Command Reference](query)""")
-@cli_util.option('--apm-domain-id', required=True, help=u"""The APM Domain ID the request is intended for.""")
+@cli_util.option('--apm-domain-id', required=True, help=u"""The APM Domain ID for the intended request.""")
@cli_util.option('--time-span-started-greater-than-or-equal-to', required=True, type=custom_types.CLI_DATETIME, help=u"""Include spans that have a `spanStartTime` equal to or greater than this value.""" + custom_types.CLI_DATETIME.VALID_DATETIME_CLI_HELP_MESSAGE)
@cli_util.option('--time-span-started-less-than', required=True, type=custom_types.CLI_DATETIME, help=u"""Include spans that have a `spanStartTime`less than this value.""" + custom_types.CLI_DATETIME.VALID_DATETIME_CLI_HELP_MESSAGE)
@cli_util.option('--query-text', help=u"""Application Performance Monitoring defined query string that filters and retrieves trace data results.""")
@cli_util.option('--limit', type=click.INT, help=u"""The maximum number of items to return.""")
-@cli_util.option('--page', help=u"""The page token representing the page at which to start retrieving results. This is usually retrieved from a previous response.""")
+@cli_util.option('--page', help=u"""The page token representing the page where to start retrieving results. This is usually retrieved from a previous response.""")
@json_skeleton_utils.get_cli_json_input_option({})
@cli_util.help_option
@click.pass_context
diff --git a/services/apm_traces/src/oci_cli_trace/generated/trace_cli.py b/services/apm_traces/src/oci_cli_trace/generated/trace_cli.py
index 523b65170..2cfb5c31a 100644
--- a/services/apm_traces/src/oci_cli_trace/generated/trace_cli.py
+++ b/services/apm_traces/src/oci_cli_trace/generated/trace_cli.py
@@ -54,19 +54,31 @@ def span_group():
@aggregated_snapshot_group.command(name=cli_util.override('trace.get_aggregated_snapshot.command_name', 'get'), help=u"""Gets the aggregated snapshot identified by trace ID. \n[Command Reference](getAggregatedSnapshot)""")
-@cli_util.option('--apm-domain-id', required=True, help=u"""The APM Domain ID the request is intended for.""")
+@cli_util.option('--apm-domain-id', required=True, help=u"""The APM Domain ID for the intended request.""")
@cli_util.option('--trace-key', required=True, help=u"""Unique Application Performance Monitoring trace identifier (traceId).""")
+@cli_util.option('--service-name', help=u"""Name associated with the service.""")
+@cli_util.option('--server-name', help=u"""Name of the server.""")
+@cli_util.option('--span-key', help=u"""Unique Application Performance Monitoring span identifier (spanId).""")
+@cli_util.option('--span-name', help=u"""Name of the span associated with the trace.""")
@json_skeleton_utils.get_cli_json_input_option({})
@cli_util.help_option
@click.pass_context
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'apm_traces', 'class': 'AggregatedSnapshot'})
@cli_util.wrap_exceptions
-def get_aggregated_snapshot(ctx, from_json, apm_domain_id, trace_key):
+def get_aggregated_snapshot(ctx, from_json, apm_domain_id, trace_key, service_name, server_name, span_key, span_name):
if isinstance(trace_key, six.string_types) and len(trace_key.strip()) == 0:
raise click.UsageError('Parameter --trace-key cannot be whitespace or empty string')
kwargs = {}
+ if service_name is not None:
+ kwargs['service_name'] = service_name
+ if server_name is not None:
+ kwargs['server_name'] = server_name
+ if span_key is not None:
+ kwargs['span_key'] = span_key
+ if span_name is not None:
+ kwargs['span_name'] = span_name
kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
client = cli_util.build_client('apm_traces', 'trace', ctx)
result = client.get_aggregated_snapshot(
@@ -78,15 +90,18 @@ def get_aggregated_snapshot(ctx, from_json, apm_domain_id, trace_key):
@span_group.command(name=cli_util.override('trace.get_span.command_name', 'get'), help=u"""Gets the span details identified by spanId. \n[Command Reference](getSpan)""")
-@cli_util.option('--apm-domain-id', required=True, help=u"""The APM Domain ID the request is intended for.""")
+@cli_util.option('--apm-domain-id', required=True, help=u"""The APM Domain ID for the intended request.""")
@cli_util.option('--span-key', required=True, help=u"""Unique Application Performance Monitoring span identifier (spanId).""")
@cli_util.option('--trace-key', required=True, help=u"""Unique Application Performance Monitoring trace identifier (traceId).""")
+@cli_util.option('--time-span-started-greater-than-or-equal-to', type=custom_types.CLI_DATETIME, help=u"""Include spans that have a `spanStartTime` equal to or greater than this value.""" + custom_types.CLI_DATETIME.VALID_DATETIME_CLI_HELP_MESSAGE)
+@cli_util.option('--time-span-started-less-than', type=custom_types.CLI_DATETIME, help=u"""Include spans that have a `spanStartTime`less than this value.""" + custom_types.CLI_DATETIME.VALID_DATETIME_CLI_HELP_MESSAGE)
+@cli_util.option('--span-namespace', type=custom_types.CliCaseInsensitiveChoice(["TRACES", "SYNTHETIC"]), help=u"""Name space from which the span details need to be retrieved.""")
@json_skeleton_utils.get_cli_json_input_option({})
@cli_util.help_option
@click.pass_context
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'apm_traces', 'class': 'Span'})
@cli_util.wrap_exceptions
-def get_span(ctx, from_json, apm_domain_id, span_key, trace_key):
+def get_span(ctx, from_json, apm_domain_id, span_key, trace_key, time_span_started_greater_than_or_equal_to, time_span_started_less_than, span_namespace):
if isinstance(span_key, six.string_types) and len(span_key.strip()) == 0:
raise click.UsageError('Parameter --span-key cannot be whitespace or empty string')
@@ -95,6 +110,12 @@ def get_span(ctx, from_json, apm_domain_id, span_key, trace_key):
raise click.UsageError('Parameter --trace-key cannot be whitespace or empty string')
kwargs = {}
+ if time_span_started_greater_than_or_equal_to is not None:
+ kwargs['time_span_started_greater_than_or_equal_to'] = time_span_started_greater_than_or_equal_to
+ if time_span_started_less_than is not None:
+ kwargs['time_span_started_less_than'] = time_span_started_less_than
+ if span_namespace is not None:
+ kwargs['span_namespace'] = span_namespace
kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
client = cli_util.build_client('apm_traces', 'trace', ctx)
result = client.get_span(
@@ -107,19 +128,28 @@ def get_span(ctx, from_json, apm_domain_id, span_key, trace_key):
@trace_group.command(name=cli_util.override('trace.get_trace.command_name', 'get'), help=u"""Gets the trace details identified by traceId. \n[Command Reference](getTrace)""")
-@cli_util.option('--apm-domain-id', required=True, help=u"""The APM Domain ID the request is intended for.""")
+@cli_util.option('--apm-domain-id', required=True, help=u"""The APM Domain ID for the intended request.""")
@cli_util.option('--trace-key', required=True, help=u"""Unique Application Performance Monitoring trace identifier (traceId).""")
+@cli_util.option('--time-trace-started-greater-than-or-equal-to', type=custom_types.CLI_DATETIME, help=u"""Include traces that have a `minTraceStartTime` equal to or greater than this value.""" + custom_types.CLI_DATETIME.VALID_DATETIME_CLI_HELP_MESSAGE)
+@cli_util.option('--time-trace-started-less-than', type=custom_types.CLI_DATETIME, help=u"""Include traces that have a `minTraceStartTime` less than this value.""" + custom_types.CLI_DATETIME.VALID_DATETIME_CLI_HELP_MESSAGE)
+@cli_util.option('--trace-namespace', type=custom_types.CliCaseInsensitiveChoice(["TRACES", "SYNTHETIC"]), help=u"""Name space from which the trace details need to be retrieved.""")
@json_skeleton_utils.get_cli_json_input_option({})
@cli_util.help_option
@click.pass_context
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'apm_traces', 'class': 'Trace'})
@cli_util.wrap_exceptions
-def get_trace(ctx, from_json, apm_domain_id, trace_key):
+def get_trace(ctx, from_json, apm_domain_id, trace_key, time_trace_started_greater_than_or_equal_to, time_trace_started_less_than, trace_namespace):
if isinstance(trace_key, six.string_types) and len(trace_key.strip()) == 0:
raise click.UsageError('Parameter --trace-key cannot be whitespace or empty string')
kwargs = {}
+ if time_trace_started_greater_than_or_equal_to is not None:
+ kwargs['time_trace_started_greater_than_or_equal_to'] = time_trace_started_greater_than_or_equal_to
+ if time_trace_started_less_than is not None:
+ kwargs['time_trace_started_less_than'] = time_trace_started_less_than
+ if trace_namespace is not None:
+ kwargs['trace_namespace'] = trace_namespace
kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
client = cli_util.build_client('apm_traces', 'trace', ctx)
result = client.get_trace(
@@ -131,10 +161,10 @@ def get_trace(ctx, from_json, apm_domain_id, trace_key):
@trace_snapshot_group.command(name=cli_util.override('trace.get_trace_snapshot.command_name', 'get'), help=u"""Gets the trace snapshots data identified by trace ID. \n[Command Reference](getTraceSnapshot)""")
-@cli_util.option('--apm-domain-id', required=True, help=u"""The APM Domain ID the request is intended for.""")
+@cli_util.option('--apm-domain-id', required=True, help=u"""The APM Domain ID for the intended request.""")
@cli_util.option('--trace-key', required=True, help=u"""Unique Application Performance Monitoring trace identifier (traceId).""")
-@cli_util.option('--is-summarized', type=click.BOOL, help=u"""If enabled, then only span level details will be sent.""")
-@cli_util.option('--thread-id', help=u"""Thread id for which snapshots needs to be retrieved. This is an identifier of a thread, and is a positive long number generated when when a thread is created.""")
+@cli_util.option('--is-summarized', type=click.BOOL, help=u"""If enabled, only span level details are sent.""")
+@cli_util.option('--thread-id', help=u"""Thread ID for which snapshots need to be retrieved. This identifier of a thread is a long positive number generated when a thread is created.""")
@cli_util.option('--snapshot-time', help=u"""Epoch time of snapshot.""")
@json_skeleton_utils.get_cli_json_input_option({})
@cli_util.help_option
diff --git a/services/apm_traces/src/oci_cli_trace/trace_cli_extended.py b/services/apm_traces/src/oci_cli_trace/trace_cli_extended.py
new file mode 100644
index 000000000..d6438b2ce
--- /dev/null
+++ b/services/apm_traces/src/oci_cli_trace/trace_cli_extended.py
@@ -0,0 +1,318 @@
+# coding: utf-8
+# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved.
+# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license.
+
+import click # noqa: F401
+import json # noqa: F401
+from services.apm_traces.src.oci_cli_trace.generated import trace_cli
+from oci_cli import cli_util # noqa: F401
+from oci_cli import custom_types # noqa: F401
+from oci_cli import json_skeleton_utils # noqa: F401
+
+
+@cli_util.copy_params_from_generated_command(trace_cli.get_span, params_to_exclude=['time_span_started_greater_than_or_equal_to', 'time_span_started_less_than'])
+@trace_cli.span_group.command(name=trace_cli.get_span.name, help=trace_cli.get_span.help)
+@cli_util.option('--time-span-started-gte', type=custom_types.CLI_DATETIME, help=u"""Include spans that have a `spanStartTime` equal to or greater than this value.
+
+The following datetime formats are supported:
+
+UTC with microseconds
+***********************
+Format: YYYY-MM-DDTHH:mm:ss.ssssssTZD
+Example: 2017-09-15T20:30:00.123456Z
+
+UTC with milliseconds
+***********************
+Format: YYYY-MM-DDTHH:mm:ss.sssTZD
+Example: 2017-09-15T20:30:00.123Z
+
+UTC without milliseconds
+**************************
+Format: YYYY-MM-DDTHH:mm:ssTZD
+Example: 2017-09-15T20:30:00Z
+
+UTC with minute precision
+**************************
+Format: YYYY-MM-DDTHH:mmTZD
+Example: 2017-09-15T20:30Z
+
+Timezone with microseconds
+***************************
+Format: YYYY-MM-DDTHH:mm:ssTZD
+Example:
+2017-09-15T12:30:00.456789-08:00,
+2017-09-15T12:30:00.456789-0800
+
+Timezone with milliseconds
+***************************
+Format: YYYY-MM-DDTHH:mm:ssTZD
+Example:
+2017-09-15T12:30:00.456-08:00,
+2017-09-15T12:30:00.456-0800
+
+Timezone without milliseconds
+*******************************
+Format: YYYY-MM-DDTHH:mm:ssTZD
+Example:
+2017-09-15T12:30:00-08:00,
+2017-09-15T12:30:00-0800
+
+Timezone with minute precision
+*******************************
+Format: YYYY-MM-DDTHH:mmTZD
+Example:
+2017-09-15T12:30-08:00,
+2017-09-15T12:30-0800
+
+Short date and time
+********************
+The timezone for this date and time will be taken as UTC (Needs to be surrounded by single or double quotes)
+Format: 'YYYY-MM-DD HH:mm' or "YYYY-MM-DD HH:mm"
+Example: '2017-09-15 17:25'
+
+Date Only
+*********
+This date will be taken as midnight UTC of that day
+Format: YYYY-MM-DD
+Example: 2017-09-15
+
+Epoch seconds
+**************
+Example: 1412195400
+ """)
+@cli_util.option('--time-span-started-lt', type=custom_types.CLI_DATETIME, help=u"""Include spans that have a `spanStartTime`less than this value.
+
+The following datetime formats are supported:
+
+UTC with microseconds
+***********************
+Format: YYYY-MM-DDTHH:mm:ss.ssssssTZD
+Example: 2017-09-15T20:30:00.123456Z
+
+UTC with milliseconds
+***********************
+Format: YYYY-MM-DDTHH:mm:ss.sssTZD
+Example: 2017-09-15T20:30:00.123Z
+
+UTC without milliseconds
+**************************
+Format: YYYY-MM-DDTHH:mm:ssTZD
+Example: 2017-09-15T20:30:00Z
+
+UTC with minute precision
+**************************
+Format: YYYY-MM-DDTHH:mmTZD
+Example: 2017-09-15T20:30Z
+
+Timezone with microseconds
+***************************
+Format: YYYY-MM-DDTHH:mm:ssTZD
+Example:
+2017-09-15T12:30:00.456789-08:00,
+2017-09-15T12:30:00.456789-0800
+
+Timezone with milliseconds
+***************************
+Format: YYYY-MM-DDTHH:mm:ssTZD
+Example:
+2017-09-15T12:30:00.456-08:00,
+2017-09-15T12:30:00.456-0800
+
+Timezone without milliseconds
+*******************************
+Format: YYYY-MM-DDTHH:mm:ssTZD
+Example:
+2017-09-15T12:30:00-08:00,
+2017-09-15T12:30:00-0800
+
+Timezone with minute precision
+*******************************
+Format: YYYY-MM-DDTHH:mmTZD
+Example:
+2017-09-15T12:30-08:00,
+2017-09-15T12:30-0800
+
+Short date and time
+********************
+The timezone for this date and time will be taken as UTC (Needs to be surrounded by single or double quotes)
+Format: 'YYYY-MM-DD HH:mm' or "YYYY-MM-DD HH:mm"
+Example: '2017-09-15 17:25'
+
+Date Only
+*********
+This date will be taken as midnight UTC of that day
+Format: YYYY-MM-DD
+Example: 2017-09-15
+
+Epoch seconds
+**************
+Example: 1412195400
+ """)
+@click.pass_context
+@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'apm_traces', 'class': 'Span'})
+@cli_util.wrap_exceptions
+def get_span_extended(ctx, **kwargs):
+
+ if 'time_span_started_gte' in kwargs:
+ kwargs['time_span_started_greater_than_or_equal_to'] = kwargs['time_span_started_gte']
+ kwargs.pop('time_span_started_gte')
+
+ if 'time_span_started_lt' in kwargs:
+ kwargs['time_span_started_less_than'] = kwargs['time_span_started_lt']
+ kwargs.pop('time_span_started_lt')
+
+ ctx.invoke(trace_cli.get_span, **kwargs)
+
+
+@cli_util.copy_params_from_generated_command(trace_cli.get_trace, params_to_exclude=['time_trace_started_greater_than_or_equal_to', 'time_trace_started_less_than'])
+@trace_cli.trace_group.command(name=trace_cli.get_trace.name, help=trace_cli.get_trace.help)
+@cli_util.option('--time-trace-started-gte', type=custom_types.CLI_DATETIME, help=u"""Include traces that have a `minTraceStartTime` equal to or greater than this value.
+
+The following datetime formats are supported:
+
+UTC with microseconds
+***********************
+Format: YYYY-MM-DDTHH:mm:ss.ssssssTZD
+Example: 2017-09-15T20:30:00.123456Z
+
+UTC with milliseconds
+***********************
+Format: YYYY-MM-DDTHH:mm:ss.sssTZD
+Example: 2017-09-15T20:30:00.123Z
+
+UTC without milliseconds
+**************************
+Format: YYYY-MM-DDTHH:mm:ssTZD
+Example: 2017-09-15T20:30:00Z
+
+UTC with minute precision
+**************************
+Format: YYYY-MM-DDTHH:mmTZD
+Example: 2017-09-15T20:30Z
+
+Timezone with microseconds
+***************************
+Format: YYYY-MM-DDTHH:mm:ssTZD
+Example:
+2017-09-15T12:30:00.456789-08:00,
+2017-09-15T12:30:00.456789-0800
+
+Timezone with milliseconds
+***************************
+Format: YYYY-MM-DDTHH:mm:ssTZD
+Example:
+2017-09-15T12:30:00.456-08:00,
+2017-09-15T12:30:00.456-0800
+
+Timezone without milliseconds
+*******************************
+Format: YYYY-MM-DDTHH:mm:ssTZD
+Example:
+2017-09-15T12:30:00-08:00,
+2017-09-15T12:30:00-0800
+
+Timezone with minute precision
+*******************************
+Format: YYYY-MM-DDTHH:mmTZD
+Example:
+2017-09-15T12:30-08:00,
+2017-09-15T12:30-0800
+
+Short date and time
+********************
+The timezone for this date and time will be taken as UTC (Needs to be surrounded by single or double quotes)
+Format: 'YYYY-MM-DD HH:mm' or "YYYY-MM-DD HH:mm"
+Example: '2017-09-15 17:25'
+
+Date Only
+*********
+This date will be taken as midnight UTC of that day
+Format: YYYY-MM-DD
+Example: 2017-09-15
+
+Epoch seconds
+**************
+Example: 1412195400
+ """)
+@cli_util.option('--time-trace-started-lt', type=custom_types.CLI_DATETIME, help=u"""Include traces that have a `minTraceStartTime` less than this value.
+
+The following datetime formats are supported:
+
+UTC with microseconds
+***********************
+Format: YYYY-MM-DDTHH:mm:ss.ssssssTZD
+Example: 2017-09-15T20:30:00.123456Z
+
+UTC with milliseconds
+***********************
+Format: YYYY-MM-DDTHH:mm:ss.sssTZD
+Example: 2017-09-15T20:30:00.123Z
+
+UTC without milliseconds
+**************************
+Format: YYYY-MM-DDTHH:mm:ssTZD
+Example: 2017-09-15T20:30:00Z
+
+UTC with minute precision
+**************************
+Format: YYYY-MM-DDTHH:mmTZD
+Example: 2017-09-15T20:30Z
+
+Timezone with microseconds
+***************************
+Format: YYYY-MM-DDTHH:mm:ssTZD
+Example:
+2017-09-15T12:30:00.456789-08:00,
+2017-09-15T12:30:00.456789-0800
+
+Timezone with milliseconds
+***************************
+Format: YYYY-MM-DDTHH:mm:ssTZD
+Example:
+2017-09-15T12:30:00.456-08:00,
+2017-09-15T12:30:00.456-0800
+
+Timezone without milliseconds
+*******************************
+Format: YYYY-MM-DDTHH:mm:ssTZD
+Example:
+2017-09-15T12:30:00-08:00,
+2017-09-15T12:30:00-0800
+
+Timezone with minute precision
+*******************************
+Format: YYYY-MM-DDTHH:mmTZD
+Example:
+2017-09-15T12:30-08:00,
+2017-09-15T12:30-0800
+
+Short date and time
+********************
+The timezone for this date and time will be taken as UTC (Needs to be surrounded by single or double quotes)
+Format: 'YYYY-MM-DD HH:mm' or "YYYY-MM-DD HH:mm"
+Example: '2017-09-15 17:25'
+
+Date Only
+*********
+This date will be taken as midnight UTC of that day
+Format: YYYY-MM-DD
+Example: 2017-09-15
+
+Epoch seconds
+**************
+Example: 1412195400
+ """)
+@click.pass_context
+@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'apm_traces', 'class': 'Trace'})
+@cli_util.wrap_exceptions
+def get_trace_extended(ctx, **kwargs):
+
+ if 'time_trace_started_gte' in kwargs:
+ kwargs['time_trace_started_greater_than_or_equal_to'] = kwargs['time_trace_started_gte']
+ kwargs.pop('time_trace_started_gte')
+
+ if 'time_trace_started_lt' in kwargs:
+ kwargs['time_trace_started_less_than'] = kwargs['time_trace_started_lt']
+ kwargs.pop('time_trace_started_lt')
+
+ ctx.invoke(trace_cli.get_trace, **kwargs)
diff --git a/services/apm_traces/tests/unit/test_apm_traces_cli_extended.py b/services/apm_traces/tests/unit/test_apm_traces_cli_extended.py
index f84b17f1e..5a5170f3c 100644
--- a/services/apm_traces/tests/unit/test_apm_traces_cli_extended.py
+++ b/services/apm_traces/tests/unit/test_apm_traces_cli_extended.py
@@ -1,7 +1,27 @@
+# Copyright (c) 2016, 2023, Oracle and/or its affiliates.
+#
+# This software is dual-licensed to you under the Universal Permissive License
+# (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl and Apache License
+# 2.0 as shown at https://www.apache.org/licenses/LICENSE-2.0. You may choose
+# either license.
+#
+# If you elect to accept the software under the Apache License, Version 2.0,
+# the following applies:
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
# coding: utf-8
# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved.
# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license.
-
import unittest
from tests import util
@@ -15,6 +35,7 @@ def test_apm_traces(self):
result = util.invoke_command(['apm-traces'])
assert 'query' in result.output
assert 'trace' in result.output
+ assert 'attributes' in result.output
assert '--help' in result.output
def test_apm_traces_query(self):
@@ -27,6 +48,19 @@ def test_apm_traces_trace(self):
result = util.invoke_command(['apm-traces', 'trace'])
assert 'trace' in result.output
assert 'span' in result.output
+ assert 'trace-snapshot' in result.output
+ assert 'aggregated-snapshot' in result.output
+ assert '--help' in result.output
+
+ def test_apm_traces_attributes(self):
+ result = util.invoke_command(['apm-traces', 'attributes'])
+ assert 'activate' in result.output
+ assert 'deactivate' in result.output
+ assert 'pin' in result.output
+ assert 'unpin' in result.output
+ assert 'update-notes' in result.output
+ assert 'auto-activate-status' in result.output
+ assert 'update-auto-activate' in result.output
assert '--help' in result.output
def test_run_query_options(self):
@@ -54,13 +88,117 @@ def test_get_span_options(self):
assert 'Error: Option \'--apm-domain-id\' requires an argument' in result.output
result = util.invoke_command(['apm-traces', 'trace', 'span', 'get', '--span-key'])
assert 'Error: Option \'--span-key\' requires an argument' in result.output
- result = util.invoke_command(['apm-traces', 'trace', 'trace', 'get', '--trace-key'])
+ result = util.invoke_command(['apm-traces', 'trace', 'span', 'get', '--trace-key'])
assert 'Error: Option \'--trace-key\' requires an argument' in result.output
+ result = util.invoke_command(['apm-traces', 'trace', 'span', 'get', '--span-namespace'])
+ assert 'Error: Option \'--span-namespace\' requires an argument' in result.output
+ result = util.invoke_command(['apm-traces', 'trace', 'span', 'get', '--time-span-started-gte'])
+ assert 'Error: Option \'--time-span-started-gte\' requires an argument' in result.output
+ result = util.invoke_command(['apm-traces', 'trace', 'span', 'get', '--time-span-started-lt'])
+ assert 'Error: Option \'--time-span-started-lt\' requires an argument' in result.output
def test_get_trace_options(self):
result = util.invoke_command(['apm-traces', 'trace', 'trace', 'get'])
assert 'Error: Missing option(s) --apm-domain-id, --trace-key.' in result.output # Validating the required attribute
- result = util.invoke_command(['apm-traces', 'trace', 'span', 'get', '--apm-domain-id'])
+ result = util.invoke_command(['apm-traces', 'trace', 'trace', 'get', '--apm-domain-id'])
assert 'Error: Option \'--apm-domain-id\' requires an argument' in result.output
result = util.invoke_command(['apm-traces', 'trace', 'trace', 'get', '--trace-key'])
assert 'Error: Option \'--trace-key\' requires an argument' in result.output
+ result = util.invoke_command(['apm-traces', 'trace', 'trace', 'get', '--time-trace-started-gte'])
+ assert 'Error: Option \'--time-trace-started-gte\' requires an argument' in result.output
+ result = util.invoke_command(['apm-traces', 'trace', 'trace', 'get', '--time-trace-started-lt'])
+ assert 'Error: Option \'--time-trace-started-lt\' requires an argument' in result.output
+ result = util.invoke_command(['apm-traces', 'trace', 'trace', 'get', '--trace-namespace'])
+ assert 'Error: Option \'--trace-namespace\' requires an argument' in result.output
+
+ def test_get_aggregated_snapshot_options(self):
+ result = util.invoke_command(['apm-traces', 'trace', 'aggregated-snapshot', 'get'])
+ assert 'Error: Missing option(s) --apm-domain-id, --trace-key.' in result.output # Validating the required attribute
+ result = util.invoke_command(['apm-traces', 'trace', 'aggregated-snapshot', 'get', '--apm-domain-id'])
+ assert 'Error: Option \'--apm-domain-id\' requires an argument' in result.output
+ result = util.invoke_command(['apm-traces', 'trace', 'aggregated-snapshot', 'get', '--trace-key'])
+ assert 'Error: Option \'--trace-key\' requires an argument' in result.output
+
+ def test_get_trace_snapshot_options(self):
+ result = util.invoke_command(['apm-traces', 'trace', 'trace-snapshot', 'get'])
+ assert 'Error: Missing option(s) --apm-domain-id, --trace-key.' in result.output # Validating the required attribute
+ result = util.invoke_command(['apm-traces', 'trace', 'trace-snapshot', 'get', '--apm-domain-id'])
+ assert 'Error: Option \'--apm-domain-id\' requires an argument' in result.output
+ result = util.invoke_command(['apm-traces', 'trace', 'trace-snapshot', 'get', '--trace-key'])
+ assert 'Error: Option \'--trace-key\' requires an argument' in result.output
+
+ def test_activate_attributes_options(self):
+ result = util.invoke_command(['apm-traces', 'attributes', 'activate'])
+ assert 'Error: Missing option(s) --apm-domain-id, --attribute-details' in result.output # Validating the required attribute
+ result = util.invoke_command(['apm-traces', 'attributes', 'activate', '--apm-domain-id'])
+ assert 'Error: Option \'--apm-domain-id\' requires an argument' in result.output
+ result = util.invoke_command(['apm-traces', 'attributes', 'activate', '--attribute-details'])
+ assert 'Error: Option \'--attribute-details\' requires an argument' in result.output
+ result = util.invoke_command(['apm-traces', 'attributes', 'activate', '--attribute-details', 'attributeDetails : [{"attributeName": "test", "attributeType" : "NUMERIC"}]'])
+ assert 'Error: Missing option(s) --apm-domain-id' in result.output
+
+ def test_activate_status_options(self):
+ result = util.invoke_command(['apm-traces', 'attributes', 'auto-activate-status'])
+ assert 'Error: Missing option(s) --apm-domain-id, --data-key-type' in result.output # Validating the required attribute
+ result = util.invoke_command(['apm-traces', 'attributes', 'auto-activate-status', '--apm-domain-id'])
+ assert 'Error: Option \'--apm-domain-id\' requires an argument' in result.output
+ result = util.invoke_command(['apm-traces', 'attributes', 'auto-activate-status', '--data-key-type'])
+ assert 'Error: Option \'--data-key-type\' requires an argument' in result.output
+
+ def test_deactivate_attributes_options(self):
+ result = util.invoke_command(['apm-traces', 'attributes', 'deactivate'])
+ assert 'Error: Missing option(s) --apm-domain-id, --attribute-details' in result.output # Validating the required attribute
+ result = util.invoke_command(['apm-traces', 'attributes', 'deactivate', '--apm-domain-id'])
+ assert 'Error: Option \'--apm-domain-id\' requires an argument' in result.output
+ result = util.invoke_command(['apm-traces', 'attributes', 'deactivate', '--attribute-details'])
+ assert 'Error: Option \'--attribute-details\' requires an argument' in result.output
+ result = util.invoke_command(['apm-traces', 'attributes', 'activate', '--attribute-details', 'attributeDetails : [{"attributeName": "test"}]'])
+ assert 'Error: Missing option(s) --apm-domain-id' in result.output
+
+ def test_pin_attributes_options(self):
+ result = util.invoke_command(['apm-traces', 'attributes', 'pin'])
+ assert 'Error: Missing option(s) --apm-domain-id, --attribute-details' in result.output # Validating the required attribute
+ result = util.invoke_command(['apm-traces', 'attributes', 'pin', '--apm-domain-id'])
+ assert 'Error: Option \'--apm-domain-id\' requires an argument' in result.output
+ result = util.invoke_command(['apm-traces', 'attributes', 'pin', '--attribute-details'])
+ assert 'Error: Option \'--attribute-details\' requires an argument' in result.output
+
+ def test_unpin_attributes_options(self):
+ result = util.invoke_command(['apm-traces', 'attributes', 'unpin'])
+ assert 'Error: Missing option(s) --apm-domain-id, --attribute-details' in result.output # Validating the required attribute
+ result = util.invoke_command(['apm-traces', 'attributes', 'unpin', '--apm-domain-id'])
+ assert 'Error: Option \'--apm-domain-id\' requires an argument' in result.output
+ result = util.invoke_command(['apm-traces', 'attributes', 'unpin', '--attribute-details'])
+ assert 'Error: Option \'--attribute-details\' requires an argument' in result.output
+
+ def test_update_auto_activate_options(self):
+ result = util.invoke_command(['apm-traces', 'attributes', 'update-auto-activate'])
+ assert 'Error: Missing option(s) --apm-domain-id, --data-key-type, --auto-activate-value' in result.output # Validating the required attribute
+ result = util.invoke_command(['apm-traces', 'attributes', 'update-auto-activate', '--apm-domain-id'])
+ assert 'Error: Option \'--apm-domain-id\' requires an argument' in result.output
+ result = util.invoke_command(['apm-traces', 'attributes', 'update-auto-activate', '--data-key-type'])
+ assert 'Error: Option \'--data-key-type\' requires an argument' in result.output
+ result = util.invoke_command(['apm-traces', 'attributes', 'update-auto-activate', '--auto-activate-value'])
+ assert 'Error: Option \'--auto-activate-value\' requires an argument' in result.output
+ result = util.invoke_command(['apm-traces', 'attributes', 'update-auto-activate', '--data-key-type', 'PRIVATE_DATA_KEY'])
+ assert 'Error: Missing option(s) --apm-domain-id, --auto-activate-value' in result.output
+ result = util.invoke_command(['apm-traces', 'attributes', 'update-auto-activate', '--data-key-type', 'PUBLIC_DATA_KEY'])
+ assert 'Error: Missing option(s) --apm-domain-id, --auto-activate-value' in result.output
+ result = util.invoke_command(['apm-traces', 'attributes', 'update-auto-activate', '--data-key-type', 'PUBLIC_DATA_KEY', '--auto-activate-value', 'TRUE'])
+ assert 'Error: Missing option(s) --apm-domain-id' in result.output
+
+ def test_update_notes_options(self):
+ result = util.invoke_command(['apm-traces', 'attributes', 'update-notes'])
+ assert 'Error: Missing option(s) --apm-domain-id, --attribute-details' in result.output # Validating the required attribute
+ result = util.invoke_command(['apm-traces', 'attributes', 'update-notes', '--apm-domain-id'])
+ assert 'Error: Option \'--apm-domain-id\' requires an argument' in result.output
+ result = util.invoke_command(['apm-traces', 'attributes', 'update-notes', '--attribute-details'])
+ assert 'Error: Option \'--attribute-details\' requires an argument' in result.output
+
+ def test_update_attribute_options(self):
+ result = util.invoke_command(['apm-traces', 'attributes', 'update-attribute'])
+ assert 'Error: Missing option(s) --apm-domain-id, --attribute-details' in result.output # Validating the required attribute
+ result = util.invoke_command(['apm-traces', 'attributes', 'update-attribute', '--apm-domain-id'])
+ assert 'Error: Option \'--apm-domain-id\' requires an argument' in result.output
+ result = util.invoke_command(['apm-traces', 'attributes', 'update-attribute', '--attribute-details'])
+ assert 'Error: Option \'--attribute-details\' requires an argument' in result.output
diff --git a/services/stack_monitoring/src/oci_cli_stack_monitoring/generated/stackmonitoring_cli.py b/services/stack_monitoring/src/oci_cli_stack_monitoring/generated/stackmonitoring_cli.py
index 8b749a652..65381f0ea 100644
--- a/services/stack_monitoring/src/oci_cli_stack_monitoring/generated/stackmonitoring_cli.py
+++ b/services/stack_monitoring/src/oci_cli_stack_monitoring/generated/stackmonitoring_cli.py
@@ -22,12 +22,6 @@ def stack_monitoring_root_group():
pass
-@click.command(cli_util.override('stack_monitoring.baselineable_metric_summary_group.command_name', 'baselineable-metric-summary'), cls=CommandGroupWithAlias, help="""Summary for the baseline-able metric""")
-@cli_util.help_option_group
-def baselineable_metric_summary_group():
- pass
-
-
@click.command(cli_util.override('stack_monitoring.metric_extension_group.command_name', 'metric-extension'), cls=CommandGroupWithAlias, help="""Detailed information of the Metric Extension resource""")
@cli_util.help_option_group
def metric_extension_group():
@@ -52,12 +46,6 @@ def process_set_group():
pass
-@click.command(cli_util.override('stack_monitoring.create_baselineable_metric_details_group.command_name', 'create-baselineable-metric-details'), cls=CommandGroupWithAlias, help="""Summary for the baseline-able metric""")
-@cli_util.help_option_group
-def create_baselineable_metric_details_group():
- pass
-
-
@click.command(cli_util.override('stack_monitoring.work_request_summary_collection_group.command_name', 'work-request-summary-collection'), cls=CommandGroupWithAlias, help="""Results of a workRequest search. Contains both WorkRequest items and other information, such as metadata.""")
@cli_util.help_option_group
def work_request_summary_collection_group():
@@ -82,12 +70,6 @@ def work_request_group():
pass
-@click.command(cli_util.override('stack_monitoring.update_baselineable_metric_details_group.command_name', 'update-baselineable-metric-details'), cls=CommandGroupWithAlias, help="""Summary for the baseline-able metric""")
-@cli_util.help_option_group
-def update_baselineable_metric_details_group():
- pass
-
-
@click.command(cli_util.override('stack_monitoring.process_set_collection_group.command_name', 'process-set-collection'), cls=CommandGroupWithAlias, help="""Result of the Process Set fetch.""")
@cli_util.help_option_group
def process_set_collection_group():
@@ -118,12 +100,6 @@ def config_collection_group():
pass
-@click.command(cli_util.override('stack_monitoring.evaluate_baselineable_metric_result_group.command_name', 'evaluate-baselineable-metric-result'), cls=CommandGroupWithAlias, help="""Result for Baseline Metric Data evaluation""")
-@cli_util.help_option_group
-def evaluate_baselineable_metric_result_group():
- pass
-
-
@click.command(cli_util.override('stack_monitoring.config_group.command_name', 'config'), cls=CommandGroupWithAlias, help="""A configuration item that, for example defines whether resources of a specific type should be discovered automatically.
In this case, the 'configType' is set to 'AUTO_PROMOTE' and additional fields like 'resourceType' and 'isEnabled' determine if such resources are to be discovered automatically (also referred to as 'Automatic Promotion').""")
@@ -144,23 +120,19 @@ def work_request_log_entry_collection_group():
pass
-stack_monitoring_root_group.add_command(baselineable_metric_summary_group)
stack_monitoring_root_group.add_command(metric_extension_group)
stack_monitoring_root_group.add_command(discovery_job_collection_group)
stack_monitoring_root_group.add_command(monitored_resource_group)
stack_monitoring_root_group.add_command(process_set_group)
-stack_monitoring_root_group.add_command(create_baselineable_metric_details_group)
stack_monitoring_root_group.add_command(work_request_summary_collection_group)
stack_monitoring_root_group.add_command(baselineable_metric_group)
stack_monitoring_root_group.add_command(monitored_resource_type_group)
stack_monitoring_root_group.add_command(work_request_group)
-stack_monitoring_root_group.add_command(update_baselineable_metric_details_group)
stack_monitoring_root_group.add_command(process_set_collection_group)
stack_monitoring_root_group.add_command(monitored_resource_task_group)
stack_monitoring_root_group.add_command(work_request_error_collection_group)
stack_monitoring_root_group.add_command(discovery_job_group)
stack_monitoring_root_group.add_command(config_collection_group)
-stack_monitoring_root_group.add_command(evaluate_baselineable_metric_result_group)
stack_monitoring_root_group.add_command(config_group)
stack_monitoring_root_group.add_command(discovery_job_log_collection_group)
stack_monitoring_root_group.add_command(work_request_log_entry_collection_group)
@@ -389,7 +361,7 @@ def change_process_set_compartment(ctx, from_json, process_set_id, compartment_i
cli_util.render_response(result, ctx)
-@create_baselineable_metric_details_group.command(name=cli_util.override('stack_monitoring.create_baselineable_metric.command_name', 'create-baselineable-metric'), help=u"""Creates the specified Baseline-able metric \n[Command Reference](createBaselineableMetric)""")
+@baselineable_metric_group.command(name=cli_util.override('stack_monitoring.create_baselineable_metric.command_name', 'create'), help=u"""Creates the specified Baseline-able metric \n[Command Reference](createBaselineableMetric)""")
@cli_util.option('--compartment-id', required=True, help=u"""OCID of the compartment""")
@cli_util.option('--name', required=True, help=u"""name of the metric""")
@cli_util.option('--column', required=True, help=u"""metric column name""")
@@ -2678,7 +2650,7 @@ def enable_metric_extension(ctx, from_json, wait_for_state, max_wait_seconds, wa
cli_util.render_response(result, ctx)
-@evaluate_baselineable_metric_result_group.command(name=cli_util.override('stack_monitoring.evaluate_baselineable_metric.command_name', 'evaluate-baselineable-metric'), help=u"""Evaluates metric for anomalies for the given data points \n[Command Reference](evaluateBaselineableMetric)""")
+@baselineable_metric_group.command(name=cli_util.override('stack_monitoring.evaluate_baselineable_metric.command_name', 'evaluate'), help=u"""Evaluates metric for anomalies for the given data points \n[Command Reference](evaluateBaselineableMetric)""")
@cli_util.option('--resource-id', required=True, help=u"""OCID of the resource""")
@cli_util.option('--items', required=True, type=custom_types.CLI_COMPLEX_TYPE, help=u"""List of Metric data""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
@cli_util.option('--baselineable-metric-id', required=True, help=u"""Identifier for the metric""")
@@ -2957,7 +2929,7 @@ def get_work_request(ctx, from_json, work_request_id):
cli_util.render_response(result, ctx)
-@baselineable_metric_summary_group.command(name=cli_util.override('stack_monitoring.list_baselineable_metrics.command_name', 'list-baselineable-metrics'), help=u"""List of summary of baseline-able metrics for a given resource group if specified. \n[Command Reference](listBaselineableMetrics)""")
+@baselineable_metric_group.command(name=cli_util.override('stack_monitoring.list_baselineable_metrics.command_name', 'list'), help=u"""List of summary of baseline-able metrics for a given resource group if specified. \n[Command Reference](listBaselineableMetrics)""")
@cli_util.option('--resource-group', help=u"""Resource Group""")
@cli_util.option('--name', help=u"""Metric Name""")
@cli_util.option('--metric-namespace', help=u"""A filter to return monitored resource types that has the matching namespace.""")
@@ -4235,7 +4207,7 @@ def update_and_propagate_tags(ctx, from_json, wait_for_state, max_wait_seconds,
cli_util.render_response(result, ctx)
-@update_baselineable_metric_details_group.command(name=cli_util.override('stack_monitoring.update_baselineable_metric.command_name', 'update-baselineable-metric'), help=u"""Updates the Baseline-able metric for the given id \n[Command Reference](updateBaselineableMetric)""")
+@baselineable_metric_group.command(name=cli_util.override('stack_monitoring.update_baselineable_metric.command_name', 'update'), help=u"""Updates the Baseline-able metric for the given id \n[Command Reference](updateBaselineableMetric)""")
@cli_util.option('--id', required=True, help=u"""OCID of the metric""")
@cli_util.option('--name', required=True, help=u"""name of the metric""")
@cli_util.option('--column', required=True, help=u"""metric column name""")
diff --git a/services/stack_monitoring/src/oci_cli_stack_monitoring/stackmonitoring_cli_extended.py b/services/stack_monitoring/src/oci_cli_stack_monitoring/stackmonitoring_cli_extended.py
index bafdcbcb7..056a80189 100644
--- a/services/stack_monitoring/src/oci_cli_stack_monitoring/stackmonitoring_cli_extended.py
+++ b/services/stack_monitoring/src/oci_cli_stack_monitoring/stackmonitoring_cli_extended.py
@@ -278,96 +278,6 @@ def manage_license_extended(ctx, **kwargs):
ctx.invoke(stackmonitoring_cli.manage_license, **kwargs)
-# oci stack-monitoring create-baselineable-metric-details create-baselineable-metric -> oci stack-monitoring baselineable-metric
-stackmonitoring_cli.create_baselineable_metric_details_group.commands.pop(stackmonitoring_cli.create_baselineable_metric.name)
-stackmonitoring_cli.baselineable_metric_group.add_command(stackmonitoring_cli.create_baselineable_metric)
-
-
-# oci stack-monitoring update-baselineable-metric-details update-baselineable-metric -> oci stack-monitoring baselineable-metric
-stackmonitoring_cli.update_baselineable_metric_details_group.commands.pop(stackmonitoring_cli.update_baselineable_metric.name)
-stackmonitoring_cli.baselineable_metric_group.add_command(stackmonitoring_cli.update_baselineable_metric)
-
-
-# oci stack-monitoring evaluate-baselineable-metric-result evaluate-baselineable-metric -> oci stack-monitoring baselineable-metric
-stackmonitoring_cli.evaluate_baselineable_metric_result_group.commands.pop(stackmonitoring_cli.evaluate_baselineable_metric.name)
-stackmonitoring_cli.baselineable_metric_group.add_command(stackmonitoring_cli.evaluate_baselineable_metric)
-
-
-# oci stack-monitoring baselineable-metric-summary list-baselineable-metrics -> oci stack-monitoring baselineable-metric
-stackmonitoring_cli.baselineable_metric_summary_group.commands.pop(stackmonitoring_cli.list_baselineable_metrics.name)
-stackmonitoring_cli.baselineable_metric_group.add_command(stackmonitoring_cli.list_baselineable_metrics)
-
-
-# oci stack-monitoring baselineable-metric create-baselineable-metric -> oci stack-monitoring baselineable-metric create
-cli_util.rename_command(stackmonitoring_cli, stackmonitoring_cli.baselineable_metric_group, stackmonitoring_cli.create_baselineable_metric, "create")
-
-
-# oci stack-monitoring baselineable update-baselineable-metric -> oci stack-monitoring baselineable-metr update
-cli_util.rename_command(stackmonitoring_cli, stackmonitoring_cli.baselineable_metric_group, stackmonitoring_cli.update_baselineable_metric, "update")
-
-
-# oci stack-monitoring baselineable-metric evaluate-baselineable-metric -> oci stack-monitoring baselineable-metr evaluate
-cli_util.rename_command(stackmonitoring_cli, stackmonitoring_cli.baselineable_metric_group, stackmonitoring_cli.evaluate_baselineable_metric, "evaluate")
-
-
-# oci stack-monitoring baselineable-metric list-baselineable-metrics -> oci stack-monitoring baselineable-metr list
-cli_util.rename_command(stackmonitoring_cli, stackmonitoring_cli.baselineable_metric_group, stackmonitoring_cli.list_baselineable_metrics, "list")
-
-
-# Remove create-baselineable-metric-details from oci stack-monitoring
-stackmonitoring_cli.stack_monitoring_root_group.commands.pop(stackmonitoring_cli.create_baselineable_metric_details_group.name)
-
-
-# Remove update-baselineable-metric-details from oci stack-monitoring
-stackmonitoring_cli.stack_monitoring_root_group.commands.pop(stackmonitoring_cli.update_baselineable_metric_details_group.name)
-
-
-# Remove evaluate-baselineable-metric-result from oci stack-monitoring
-stackmonitoring_cli.stack_monitoring_root_group.commands.pop(stackmonitoring_cli.evaluate_baselineable_metric_result_group.name)
-
-
-# Remove baselineable-metric-summary from oci stack-monitoring
-stackmonitoring_cli.stack_monitoring_root_group.commands.pop(stackmonitoring_cli.baselineable_metric_summary_group.name)
-
-
-# oci stack-monitoring update-baselineable-metric-details update-baselineable-metric --baselineable-metric-id -> oci stack-monitoring baselineable-metric update --metric-id
-# oci stack-monitoring update-baselineable-metric-details update-baselineable-metric --namespace -> oci stack-monitoring baselineable-metric update --metric-namespace
-@cli_util.copy_params_from_generated_command(stackmonitoring_cli.update_baselineable_metric, params_to_exclude=['baselineable_metric_id', 'namespace'])
-@stackmonitoring_cli.baselineable_metric_group.command(name=stackmonitoring_cli.update_baselineable_metric.name, help=stackmonitoring_cli.update_baselineable_metric.help)
-@cli_util.option('--metric-id', required=True, help=u"""Identifier for the metric [required]""")
-@cli_util.option('--metric-namespace', required=True, help=u"""namespace of the metric [required]""")
-@click.pass_context
-@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'freeform-tags': {'module': 'stack_monitoring', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'stack_monitoring', 'class': 'dict(str, dict(str, object))'}, 'system-tags': {'module': 'stack_monitoring', 'class': 'dict(str, dict(str, object))'}}, output_type={'module': 'stack_monitoring', 'class': 'BaselineableMetric'})
-@cli_util.wrap_exceptions
-def update_baselineable_metric_extended(ctx, **kwargs):
-
- if 'metric_id' in kwargs:
- kwargs['baselineable_metric_id'] = kwargs['metric_id']
- kwargs.pop('metric_id')
-
- if 'metric_namespace' in kwargs:
- kwargs['namespace'] = kwargs['metric_namespace']
- kwargs.pop('metric_namespace')
-
- ctx.invoke(stackmonitoring_cli.update_baselineable_metric, **kwargs)
-
-
-# oci stack-monitoring evaluate-baselineable-metric-result evaluate-baselineable-metric --baselineable-metric-id -> oci stack-monitoring baselineable-metric evaluate --metric-id
-@cli_util.copy_params_from_generated_command(stackmonitoring_cli.evaluate_baselineable_metric, params_to_exclude=['baselineable_metric_id'])
-@stackmonitoring_cli.baselineable_metric_group.command(name=stackmonitoring_cli.evaluate_baselineable_metric.name, help=stackmonitoring_cli.evaluate_baselineable_metric.help)
-@cli_util.option('--metric-id', required=True, help=u"""Identifier for the metric [required]""")
-@click.pass_context
-@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'freeform-tags': {'module': 'stack_monitoring', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'stack_monitoring', 'class': 'dict(str, dict(str, object))'}, 'system-tags': {'module': 'stack_monitoring', 'class': 'dict(str, dict(str, object))'}, 'items': {'module': 'stack_monitoring', 'class': 'list[MetricData]'}}, output_type={'module': 'stack_monitoring', 'class': 'BaselineableMetric'})
-@cli_util.wrap_exceptions
-def evaluate_baselineable_metric_extended(ctx, **kwargs):
-
- if 'metric_id' in kwargs:
- kwargs['baselineable_metric_id'] = kwargs['metric_id']
- kwargs.pop('metric_id')
-
- ctx.invoke(stackmonitoring_cli.evaluate_baselineable_metric, **kwargs)
-
-
# oci stack-monitoring baselineable-metric get --baselineable-metric-id -> oci stack-monitoring baselineable-metric get --metric-id
@cli_util.copy_params_from_generated_command(stackmonitoring_cli.delete_baselineable_metric, params_to_exclude=['baselineable_metric_id'])
@stackmonitoring_cli.baselineable_metric_group.command(name=stackmonitoring_cli.delete_baselineable_metric.name, help=stackmonitoring_cli.delete_baselineable_metric.help)
@@ -400,38 +310,6 @@ def get_baselineable_metric_extended(ctx, **kwargs):
ctx.invoke(stackmonitoring_cli.get_baselineable_metric, **kwargs)
-# oci stack-monitoring create-baselineable-metric-details create-baselineable-metric --namespace -> oci stack-monitoring baselineable-metric create --metric-namespace
-@cli_util.copy_params_from_generated_command(stackmonitoring_cli.create_baselineable_metric, params_to_exclude=['namespace'])
-@stackmonitoring_cli.baselineable_metric_group.command(name=stackmonitoring_cli.create_baselineable_metric.name, help=stackmonitoring_cli.create_baselineable_metric.help)
-@cli_util.option('--metric-namespace', required=True, help=u"""namespace of the metric [required]""")
-@click.pass_context
-@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'stack_monitoring', 'class': 'BaselineableMetric'})
-@cli_util.wrap_exceptions
-def create_baselineable_metric_extended(ctx, **kwargs):
-
- if 'metric_namespace' in kwargs:
- kwargs['namespace'] = kwargs['metric_namespace']
- kwargs.pop('metric_namespace')
-
- ctx.invoke(stackmonitoring_cli.create_baselineable_metric, **kwargs)
-
-
-# oci stack-monitoring baselineable-metric list-baselineable-metrics --baselineable-metric-id -> oci stack-monitoring baselineable-metric list --metric-id
-@cli_util.copy_params_from_generated_command(stackmonitoring_cli.list_baselineable_metrics, params_to_exclude=['baselineable_metric_id'])
-@stackmonitoring_cli.baselineable_metric_group.command(name=stackmonitoring_cli.list_baselineable_metrics.name, help=stackmonitoring_cli.list_baselineable_metrics.help)
-@cli_util.option('--metric-id', help=u"""Identifier for the metric""")
-@click.pass_context
-@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'freeform-tags': {'module': 'stack_monitoring', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'stack_monitoring', 'class': 'dict(str, dict(str, object))'}, 'system-tags': {'module': 'stack_monitoring', 'class': 'dict(str, dict(str, object))'}, 'items': {'module': 'stack_monitoring', 'class': 'list[MetricData]'}}, output_type={'module': 'stack_monitoring', 'class': 'BaselineableMetric'})
-@cli_util.wrap_exceptions
-def list_baselineable_metrics_extended(ctx, **kwargs):
-
- if 'metric_id' in kwargs:
- kwargs['baselineable_metric_id'] = kwargs['metric_id']
- kwargs.pop('metric_id')
-
- ctx.invoke(stackmonitoring_cli.list_baselineable_metrics, **kwargs)
-
-
# oci stack-monitoring monitored-resource-task create-monitored-resource-task-import-oci-telemetry-resources-task-details -> oci stack-monitoring monitored- import-telemetry-resources
cli_util.rename_command(stackmonitoring_cli, stackmonitoring_cli.monitored_resource_task_group, stackmonitoring_cli.create_monitored_resource_task_import_oci_telemetry_resources_task_details, "import-telemetry-resources")
@@ -1205,3 +1083,68 @@ def update_metric_extension_sql_update_query_properties_extended(ctx, **kwargs):
# oci stack-monitoring process-set-collection list-process-sets -> oci stack-monitoring process-set
stackmonitoring_cli.process_set_collection_group.commands.pop(stackmonitoring_cli.list_process_sets.name)
stackmonitoring_cli.process_set_group.add_command(stackmonitoring_cli.list_process_sets)
+
+
+@cli_util.copy_params_from_generated_command(stackmonitoring_cli.create_baselineable_metric, params_to_exclude=['namespace'])
+@stackmonitoring_cli.baselineable_metric_group.command(name=stackmonitoring_cli.create_baselineable_metric.name, help=stackmonitoring_cli.create_baselineable_metric.help)
+@cli_util.option('--metric-namespace', required=True, help=u"""namespace of the metric [required]""")
+@click.pass_context
+@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'stack_monitoring', 'class': 'BaselineableMetric'})
+@cli_util.wrap_exceptions
+def create_baselineable_metric_extended(ctx, **kwargs):
+
+ if 'metric_namespace' in kwargs:
+ kwargs['namespace'] = kwargs['metric_namespace']
+ kwargs.pop('metric_namespace')
+
+ ctx.invoke(stackmonitoring_cli.create_baselineable_metric, **kwargs)
+
+
+@cli_util.copy_params_from_generated_command(stackmonitoring_cli.update_baselineable_metric, params_to_exclude=['baselineable_metric_id', 'namespace'])
+@stackmonitoring_cli.baselineable_metric_group.command(name=stackmonitoring_cli.update_baselineable_metric.name, help=stackmonitoring_cli.update_baselineable_metric.help)
+@cli_util.option('--metric-namespace', required=True, help="""namespace of the metric [required]""")
+@cli_util.option('--metric-id', required=True, help=u"""Identifier for the metric [required]""")
+@click.pass_context
+@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'freeform-tags': {'module': 'stack_monitoring', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'stack_monitoring', 'class': 'dict(str, dict(str, object))'}, 'system-tags': {'module': 'stack_monitoring', 'class': 'dict(str, dict(str, object))'}}, output_type={'module': 'stack_monitoring', 'class': 'BaselineableMetric'})
+@cli_util.wrap_exceptions
+def update_baselineable_metric_extended(ctx, **kwargs):
+
+ if 'metric_namespace' in kwargs:
+ kwargs['namespace'] = kwargs['metric_namespace']
+ kwargs.pop('metric_namespace')
+
+ if 'metric_id' in kwargs:
+ kwargs['baselineable_metric_id'] = kwargs['metric_id']
+ kwargs.pop('metric_id')
+
+ ctx.invoke(stackmonitoring_cli.update_baselineable_metric, **kwargs)
+
+
+@cli_util.copy_params_from_generated_command(stackmonitoring_cli.evaluate_baselineable_metric, params_to_exclude=['baselineable_metric_id'])
+@stackmonitoring_cli.baselineable_metric_group.command(name=stackmonitoring_cli.evaluate_baselineable_metric.name, help=stackmonitoring_cli.evaluate_baselineable_metric.help)
+@cli_util.option('--metric-id', required=True, help=u"""Identifier for the metric [required]""")
+@click.pass_context
+@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'items': {'module': 'stack_monitoring', 'class': 'list[MetricData]'}}, output_type={'module': 'stack_monitoring', 'class': 'EvaluateBaselineableMetricResult'})
+@cli_util.wrap_exceptions
+def evaluate_baselineable_metric_extended(ctx, **kwargs):
+
+ if 'metric_id' in kwargs:
+ kwargs['baselineable_metric_id'] = kwargs['metric_id']
+ kwargs.pop('metric_id')
+
+ ctx.invoke(stackmonitoring_cli.evaluate_baselineable_metric, **kwargs)
+
+
+@cli_util.copy_params_from_generated_command(stackmonitoring_cli.list_baselineable_metrics, params_to_exclude=['baselineable_metric_id'])
+@stackmonitoring_cli.baselineable_metric_group.command(name=stackmonitoring_cli.list_baselineable_metrics.name, help=stackmonitoring_cli.list_baselineable_metrics.help)
+@cli_util.option('--metric-id', help=u"""Identifier for the metric""")
+@click.pass_context
+@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'stack_monitoring', 'class': 'BaselineableMetricSummaryCollection'})
+@cli_util.wrap_exceptions
+def list_baselineable_metrics_extended(ctx, **kwargs):
+
+ if 'metric_id' in kwargs:
+ kwargs['baselineable_metric_id'] = kwargs['metric_id']
+ kwargs.pop('metric_id')
+
+ ctx.invoke(stackmonitoring_cli.list_baselineable_metrics, **kwargs)
diff --git a/setup.py b/setup.py
index 2f908893f..7ea1d3456 100644
--- a/setup.py
+++ b/setup.py
@@ -30,7 +30,7 @@ def open_relative(*path):
readme = f.read()
requires = [
- 'oci==2.124.1',
+ 'oci==2.124.2',
'arrow>=1.0.0',
'certifi',
'click==8.0.4',
diff --git a/src/oci_cli/version.py b/src/oci_cli/version.py
index 0874cfc6d..35eff1ad3 100644
--- a/src/oci_cli/version.py
+++ b/src/oci_cli/version.py
@@ -2,4 +2,4 @@
# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved.
# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license.
-__version__ = '3.37.13'
+__version__ = '3.37.14'