diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index 2ef660988..69de535cf 100644
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -6,6 +6,84 @@ All notable changes to this project will be documented in this file.
The format is based on `Keep a Changelog `__.
+3.89.2 - 2026-07-14
+-------------------
+Added
+~~~~~
+* Container Instance
+
+ * Support for FSS volumes (volumeType OCI_FSS_FILE_SYSTEM) and Linux security context when creating container instances
+
+ * ``oci container-instances container-instance create``
+ * ``oci container-instances container-instance create-container-instance-create-linux-container-instance-security-context-details``
+
+* Digital Assistant Service Instance
+
+ * Support for new optional parameter ``--security-attributes``
+
+ * ``oci oda management oda-private-endpoint create --security-attributes``
+ * ``oci oda management oda-private-endpoint update --security-attributes``
+
+* Compute Service
+
+ * Support for new optional parameter ``--placement-constraint-details`` (and related subcommands) for Compute Cluster, Dedicated VM Host, and Instance resources
+
+ * ``oci compute compute-cluster create --placement-constraint-details``
+ * ``oci compute compute-cluster update --placement-constraint-details``
+ * ``oci compute dedicated-vm-host create --placement-constraint-details``
+ * ``oci compute instance launch --placement-constraint-details``
+
+* Compute Management Service
+
+ * Support for GPU Memory Cluster (GMC) in instance configurations and instance pools
+
+ * ``oci compute-management instance-configuration create-instance-configuration-create-gmc-configuration-details --gmc-configs --source``
+ * ``oci compute-management instance-pool create --source``
+ * ``oci compute-management instance-pool update --source``
+
+* Generative AI Service Management
+
+ * Support for Hosted Application IAM operations
+
+ * ``oci generative-ai hosted-application-iam create``
+ * ``oci generative-ai hosted-application-iam delete``
+ * ``oci generative-ai hosted-application-iam get``
+ * ``oci generative-ai hosted-application-iam update``
+ * ``oci generative-ai hosted-application-iam change-compartment``
+ * ``oci generative-ai hosted-application-collection list-hosted-applications-iam``
+
+ * Support for new required parameter ``--inbound-auth-config`` on hosted application create and new optional parameters on hosted deployment artifact commands
+
+ * ``oci generative-ai hosted-application create --inbound-auth-config``
+ * ``oci generative-ai hosted-deployment create --artifact-is-vulnerability-scan-required``
+ * ``oci generative-ai hosted-deployment update --active-artifact-is-vulnerability-scan-required``
+
+* AiDataPlatform Control Plane
+
+ * Support for AI Agents features, including new command to enable AI feature and new optional parameters on create
+
+ * ``oci ai-data-platform ai-data-platform enable-ai-feature``
+ * ``oci ai-data-platform ai-data-platform create --is-enable-ai-feature --vector-db-id --vector-db-admin-cred --vector-db-admin-secret-id``
+
+* DataCC
+
+ * Support for the service
+
+ * ``oci datacc``
+
+Changed
+~~~~~~~
+* OS Management Hub
+
+ * ``--software-source-ids`` is now an optional parameter
+
+ * ``oci os-management-hub profile create-software-source-profile --software-source-ids``
+
+Security
+~~~~~~~~
+- Updated cryptography dependency to `>=3.2.1,<50.0.0` for all python versions per: https://advisories.gitlab.com/pypi/cryptography/GHSA-537c-gmf6-5ccf/
+
+
3.89.1 - 2026-07-07
-------------------
Security
diff --git a/requirements.txt b/requirements.txt
index 8e84dc3db..d3f33c013 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -5,18 +5,18 @@
appdirs==1.4.3
arrow>=1.0.0,<2.0.0
certifi>=2025.1.31,<2026.0.0
-cffi>=1.9.1,<2.0.0
+cffi>=1.9.1,<=2.0.0
click<=8.1.2
coverage==6.2; python_version < '3.9'
coverage==7.10.7; python_version >= '3.9'
-cryptography>=3.2.1,<47.0.0
+cryptography>=3.2.1,<50.0.0
httpsig-cffi==15.0.0
Jinja2<3.0.0; python_version == '3.6'
Jinja2>=3.1.5,<4.0.0; python_version >= '3.7'
jmespath>=0.10.0,<=1.0.1
ndg-httpsclient==0.4.2
mock==2.0.0
-oci==2.181.1
+oci==2.182.0
packaging>=22.0,<25.0; python_version > '3.8'
packaging==20.2; python_version <= '3.8'
pluggy==0.13.0; python_version < '3.9'
diff --git a/services/ai_data_platform/src/oci_cli_ai_data_platform/generated/aidataplatform_cli.py b/services/ai_data_platform/src/oci_cli_ai_data_platform/generated/aidataplatform_cli.py
index 609480fa1..b20c65bf6 100644
--- a/services/ai_data_platform/src/oci_cli_ai_data_platform/generated/aidataplatform_cli.py
+++ b/services/ai_data_platform/src/oci_cli_ai_data_platform/generated/aidataplatform_cli.py
@@ -160,6 +160,10 @@ def change_ai_data_platform_compartment(ctx, from_json, wait_for_state, max_wait
@cli_util.option('--compartment-id', required=True, help=u"""The [OCID] of the compartment to create the AiDataPlatform in.""")
@cli_util.option('--display-name', help=u"""A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.""")
@cli_util.option('--ai-data-platform-type', help=u"""The AiDataPlatform type.""")
+@cli_util.option('--is-enable-ai-feature', type=click.BOOL, help=u"""The flag to enable/disable AiFeatures for the instance.""")
+@cli_util.option('--vector-db-id', help=u"""The [OCID] of the vector db Lakehouse 26ai.""")
+@cli_util.option('--vector-db-admin-cred', help=u"""The Vector DB Lakehouse 26ai ADMIN user password.""")
+@cli_util.option('--vector-db-admin-secret-id', help=u"""The [OCID] of the OCI Vault secret holding the vector db Lakehouse 26ai Admin user password.""")
@cli_util.option('--default-workspace-name', help=u"""The name for the default workspace for the AiDataPlatform""")
@cli_util.option('--freeform-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags].
@@ -178,7 +182,7 @@ def change_ai_data_platform_compartment(ctx, from_json, wait_for_state, max_wait
@click.pass_context
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'freeform-tags': {'module': 'ai_data_platform', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'ai_data_platform', 'class': 'dict(str, dict(str, object))'}, 'system-tags': {'module': 'ai_data_platform', 'class': 'dict(str, dict(str, object))'}}, output_type={'module': 'ai_data_platform', 'class': 'AiDataPlatform'})
@cli_util.wrap_exceptions
-def create_ai_data_platform(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, compartment_id, display_name, ai_data_platform_type, default_workspace_name, freeform_tags, defined_tags, system_tags):
+def create_ai_data_platform(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, compartment_id, display_name, ai_data_platform_type, is_enable_ai_feature, vector_db_id, vector_db_admin_cred, vector_db_admin_secret_id, default_workspace_name, freeform_tags, defined_tags, system_tags):
kwargs = {}
kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
@@ -192,6 +196,18 @@ def create_ai_data_platform(ctx, from_json, wait_for_state, max_wait_seconds, wa
if ai_data_platform_type is not None:
_details['aiDataPlatformType'] = ai_data_platform_type
+ if is_enable_ai_feature is not None:
+ _details['isEnableAiFeature'] = is_enable_ai_feature
+
+ if vector_db_id is not None:
+ _details['vectorDbId'] = vector_db_id
+
+ if vector_db_admin_cred is not None:
+ _details['vectorDbAdminCred'] = vector_db_admin_cred
+
+ if vector_db_admin_secret_id is not None:
+ _details['vectorDbAdminSecretId'] = vector_db_admin_secret_id
+
if default_workspace_name is not None:
_details['defaultWorkspaceName'] = default_workspace_name
@@ -298,6 +314,77 @@ def delete_ai_data_platform(ctx, from_json, wait_for_state, max_wait_seconds, wa
cli_util.render_response(result, ctx)
+@ai_data_platform_group.command(name=cli_util.override('ai_data_platform.enable_ai_feature.command_name', 'enable-ai-feature'), help=u"""The AiDataPlatform will be enabled with AI features \n[Command Reference](enableAiFeature)""")
+@cli_util.option('--ai-data-platform-id', required=True, help=u"""The [OCID] of the AiDataPlatform.""")
+@cli_util.option('--vector-db-id', help=u"""The [OCID] of the vector db Lakehouse 26ai.""")
+@cli_util.option('--vector-db-admin-cred', help=u"""The Vector DB Lakehouse 26ai ADMIN user password.""")
+@cli_util.option('--vector-db-admin-secret-id', help=u"""The [OCID] of the OCI Vault secret holding the vector db Lakehouse 26ai Admin user password.""")
+@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", "WAITING", "NEEDS_ATTENTION", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED"]), 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 ACCEPTED --wait-for-state CANCELED 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 enable_ai_feature(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, ai_data_platform_id, vector_db_id, vector_db_admin_cred, vector_db_admin_secret_id, if_match):
+
+ if isinstance(ai_data_platform_id, six.string_types) and len(ai_data_platform_id.strip()) == 0:
+ raise click.UsageError('Parameter --ai-data-platform-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 vector_db_id is not None:
+ _details['vectorDbId'] = vector_db_id
+
+ if vector_db_admin_cred is not None:
+ _details['vectorDbAdminCred'] = vector_db_admin_cred
+
+ if vector_db_admin_secret_id is not None:
+ _details['vectorDbAdminSecretId'] = vector_db_admin_secret_id
+
+ client = cli_util.build_client('ai_data_platform', 'ai_data_platform', ctx)
+ result = client.enable_ai_feature(
+ ai_data_platform_id=ai_data_platform_id,
+ enable_ai_feature_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)
+
+
@ai_data_platform_group.command(name=cli_util.override('ai_data_platform.get_ai_data_platform.command_name', 'get'), help=u"""Gets information about a AiDataPlatform. \n[Command Reference](getAiDataPlatform)""")
@cli_util.option('--ai-data-platform-id', required=True, help=u"""The [OCID] of the AiDataPlatform.""")
@json_skeleton_utils.get_cli_json_input_option({})
diff --git a/services/ai_data_platform/tests/util/generated/command_to_api.py b/services/ai_data_platform/tests/util/generated/command_to_api.py
index 8ef2871e0..cfc7e8411 100644
--- a/services/ai_data_platform/tests/util/generated/command_to_api.py
+++ b/services/ai_data_platform/tests/util/generated/command_to_api.py
@@ -6,6 +6,7 @@
"ai_data_platform.change_ai_data_platform_compartment": "oci.ai_data_platform.AiDataPlatformClient.change_ai_data_platform_compartment",
"ai_data_platform.create_ai_data_platform": "oci.ai_data_platform.AiDataPlatformClient.create_ai_data_platform",
"ai_data_platform.delete_ai_data_platform": "oci.ai_data_platform.AiDataPlatformClient.delete_ai_data_platform",
+ "ai_data_platform.enable_ai_feature": "oci.ai_data_platform.AiDataPlatformClient.enable_ai_feature",
"ai_data_platform.get_ai_data_platform": "oci.ai_data_platform.AiDataPlatformClient.get_ai_data_platform",
"ai_data_platform.get_work_request": "oci.ai_data_platform.AiDataPlatformClient.get_work_request",
"ai_data_platform.list_ai_data_platforms": "oci.ai_data_platform.AiDataPlatformClient.list_ai_data_platforms",
diff --git a/services/container_instances/src/oci_cli_container_instance/generated/containerinstance_cli.py b/services/container_instances/src/oci_cli_container_instance/generated/containerinstance_cli.py
index eb4875614..f46698a45 100644
--- a/services/container_instances/src/oci_cli_container_instance/generated/containerinstance_cli.py
+++ b/services/container_instances/src/oci_cli_container_instance/generated/containerinstance_cli.py
@@ -174,6 +174,117 @@ def change_container_instance_compartment(ctx, from_json, wait_for_state, max_wa
@cli_util.option('--container-restart-policy', help=u"""Container restart policy""")
@cli_util.option('--freeform-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: `{\"bar-key\": \"value\"}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
@cli_util.option('--defined-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}`.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
+@cli_util.option('--security-context', 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", "SUCCEEDED", "CANCELING", "CANCELED"]), 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 ACCEPTED --wait-for-state CANCELED 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({'shape-config': {'module': 'container_instances', 'class': 'CreateContainerInstanceShapeConfigDetails'}, 'volumes': {'module': 'container_instances', 'class': 'list[CreateContainerVolumeDetails]'}, 'containers': {'module': 'container_instances', 'class': 'list[CreateContainerDetails]'}, 'vnics': {'module': 'container_instances', 'class': 'list[CreateContainerVnicDetails]'}, 'dns-config': {'module': 'container_instances', 'class': 'CreateContainerDnsConfigDetails'}, 'image-pull-secrets': {'module': 'container_instances', 'class': 'list[CreateImagePullSecretDetails]'}, 'freeform-tags': {'module': 'container_instances', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'container_instances', 'class': 'dict(str, dict(str, object))'}, 'security-context': {'module': 'container_instances', 'class': 'CreateContainerInstanceSecurityContextDetails'}})
+@cli_util.help_option
+@click.pass_context
+@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'shape-config': {'module': 'container_instances', 'class': 'CreateContainerInstanceShapeConfigDetails'}, 'volumes': {'module': 'container_instances', 'class': 'list[CreateContainerVolumeDetails]'}, 'containers': {'module': 'container_instances', 'class': 'list[CreateContainerDetails]'}, 'vnics': {'module': 'container_instances', 'class': 'list[CreateContainerVnicDetails]'}, 'dns-config': {'module': 'container_instances', 'class': 'CreateContainerDnsConfigDetails'}, 'image-pull-secrets': {'module': 'container_instances', 'class': 'list[CreateImagePullSecretDetails]'}, 'freeform-tags': {'module': 'container_instances', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'container_instances', 'class': 'dict(str, dict(str, object))'}, 'security-context': {'module': 'container_instances', 'class': 'CreateContainerInstanceSecurityContextDetails'}}, output_type={'module': 'container_instances', 'class': 'ContainerInstance'})
+@cli_util.wrap_exceptions
+def create_container_instance(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, compartment_id, availability_domain, shape, shape_config, containers, vnics, display_name, fault_domain, volumes, dns_config, graceful_shutdown_timeout_in_seconds, image_pull_secrets, container_restart_policy, freeform_tags, defined_tags, security_context):
+
+ kwargs = {}
+ kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
+
+ _details = {}
+ _details['compartmentId'] = compartment_id
+ _details['availabilityDomain'] = availability_domain
+ _details['shape'] = shape
+ _details['shapeConfig'] = cli_util.parse_json_parameter("shape_config", shape_config)
+ _details['containers'] = cli_util.parse_json_parameter("containers", containers)
+ _details['vnics'] = cli_util.parse_json_parameter("vnics", vnics)
+
+ if display_name is not None:
+ _details['displayName'] = display_name
+
+ if fault_domain is not None:
+ _details['faultDomain'] = fault_domain
+
+ if volumes is not None:
+ _details['volumes'] = cli_util.parse_json_parameter("volumes", volumes)
+
+ if dns_config is not None:
+ _details['dnsConfig'] = cli_util.parse_json_parameter("dns_config", dns_config)
+
+ if graceful_shutdown_timeout_in_seconds is not None:
+ _details['gracefulShutdownTimeoutInSeconds'] = graceful_shutdown_timeout_in_seconds
+
+ if image_pull_secrets is not None:
+ _details['imagePullSecrets'] = cli_util.parse_json_parameter("image_pull_secrets", image_pull_secrets)
+
+ if container_restart_policy is not None:
+ _details['containerRestartPolicy'] = container_restart_policy
+
+ if freeform_tags is not None:
+ _details['freeformTags'] = cli_util.parse_json_parameter("freeform_tags", freeform_tags)
+
+ if defined_tags is not None:
+ _details['definedTags'] = cli_util.parse_json_parameter("defined_tags", defined_tags)
+
+ if security_context is not None:
+ _details['securityContext'] = cli_util.parse_json_parameter("security_context", security_context)
+
+ client = cli_util.build_client('container_instances', 'container_instance', ctx)
+ result = client.create_container_instance(
+ create_container_instance_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)
+
+
+@container_instance_group.command(name=cli_util.override('container_instances.create_container_instance_create_linux_container_instance_security_context_details.command_name', 'create-container-instance-create-linux-container-instance-security-context-details'), help=u"""Creates a container instance and deploys the containers on it. \n[Command Reference](createContainerInstance)""")
+@cli_util.option('--compartment-id', required=True, help=u"""The compartment OCID.""")
+@cli_util.option('--availability-domain', required=True, help=u"""The availability domain where the container instance runs.""")
+@cli_util.option('--shape', required=True, help=u"""The shape of the container instance. The shape determines the resources available to the container instance.""")
+@cli_util.option('--shape-config', required=True, type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
+@cli_util.option('--containers', required=True, type=custom_types.CLI_COMPLEX_TYPE, help=u"""The containers to create on this container instance.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
+@cli_util.option('--vnics', required=True, type=custom_types.CLI_COMPLEX_TYPE, help=u"""The networks available to containers on this container instance.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
+@cli_util.option('--display-name', help=u"""A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. If you don't provide a name, a name is generated automatically.""")
+@cli_util.option('--fault-domain', help=u"""The fault domain where the container instance runs.""")
+@cli_util.option('--volumes', type=custom_types.CLI_COMPLEX_TYPE, help=u"""A volume is a directory with data that is accessible across multiple containers in a container instance.
+
+You can attach up to 32 volumes to single container instance.
+
+This option is a JSON list with items of type CreateContainerVolumeDetails. For documentation on CreateContainerVolumeDetails please see our API reference: https://docs.oracle.com/en-us/iaas/api/#/en/containerinstance/20210415/datatypes/CreateContainerVolumeDetails.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
+@cli_util.option('--dns-config', type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
+@cli_util.option('--graceful-shutdown-timeout-in-seconds', type=click.INT, help=u"""The amount of time that processes in a container have to gracefully end when the container must be stopped. For example, when you delete a container instance. After the timeout is reached, the processes are sent a signal to be deleted.""")
+@cli_util.option('--image-pull-secrets', type=custom_types.CLI_COMPLEX_TYPE, help=u"""The image pulls secrets so you can access private registry to pull container images.
+
+This option is a JSON list with items of type CreateImagePullSecretDetails. For documentation on CreateImagePullSecretDetails please see our API reference: https://docs.oracle.com/en-us/iaas/api/#/en/containerinstance/20210415/datatypes/CreateImagePullSecretDetails.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
+@cli_util.option('--container-restart-policy', help=u"""Container restart policy""")
+@cli_util.option('--freeform-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: `{\"bar-key\": \"value\"}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
+@cli_util.option('--defined-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}`.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
+@cli_util.option('--security-context-fs-group', type=click.INT, help=u"""A special supplemental group that applies to all containers in the container instance. Some volume types allow the container instance to change ownership of the volume. The owning GID will be the fsGroup, the setgid bit will be set (new files will be owned by the fsGroup), and the permission bits are OR'd with rw-rw----. If unset, the container instance will not modify the ownership and permissions of volumes.""")
+@cli_util.option('--security-context-fs-group-change-policy', type=custom_types.CliCaseInsensitiveChoice(["ALWAYS", "ON_ROOT_MISMATCH"]), help=u"""Defines behavior of changing ownership and permission of the volume before being exposed inside the containers. This only applies to volumes which support fsGroup ownership and permissions, and will have no effect on ephemeral volumes. ON_ROOT_MISMATCH only changes permissions and ownership if the permission and ownership of the root directory does not match the expected permissions and ownership of the volume. This can improve container instance start times. ALWAYS changes permission and ownership of the volume when it is mounted. If unset, ALWAYS is used.""")
@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED"]), 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 ACCEPTED --wait-for-state CANCELED 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.""")
@@ -182,12 +293,13 @@ def change_container_instance_compartment(ctx, from_json, wait_for_state, max_wa
@click.pass_context
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'shape-config': {'module': 'container_instances', 'class': 'CreateContainerInstanceShapeConfigDetails'}, 'volumes': {'module': 'container_instances', 'class': 'list[CreateContainerVolumeDetails]'}, 'containers': {'module': 'container_instances', 'class': 'list[CreateContainerDetails]'}, 'vnics': {'module': 'container_instances', 'class': 'list[CreateContainerVnicDetails]'}, 'dns-config': {'module': 'container_instances', 'class': 'CreateContainerDnsConfigDetails'}, 'image-pull-secrets': {'module': 'container_instances', 'class': 'list[CreateImagePullSecretDetails]'}, 'freeform-tags': {'module': 'container_instances', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'container_instances', 'class': 'dict(str, dict(str, object))'}}, output_type={'module': 'container_instances', 'class': 'ContainerInstance'})
@cli_util.wrap_exceptions
-def create_container_instance(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, compartment_id, availability_domain, shape, shape_config, containers, vnics, display_name, fault_domain, volumes, dns_config, graceful_shutdown_timeout_in_seconds, image_pull_secrets, container_restart_policy, freeform_tags, defined_tags):
+def create_container_instance_create_linux_container_instance_security_context_details(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, compartment_id, availability_domain, shape, shape_config, containers, vnics, display_name, fault_domain, volumes, dns_config, graceful_shutdown_timeout_in_seconds, image_pull_secrets, container_restart_policy, freeform_tags, defined_tags, security_context_fs_group, security_context_fs_group_change_policy):
kwargs = {}
kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
_details = {}
+ _details['securityContext'] = {}
_details['compartmentId'] = compartment_id
_details['availabilityDomain'] = availability_domain
_details['shape'] = shape
@@ -222,6 +334,14 @@ def create_container_instance(ctx, from_json, wait_for_state, max_wait_seconds,
if defined_tags is not None:
_details['definedTags'] = cli_util.parse_json_parameter("defined_tags", defined_tags)
+ if security_context_fs_group is not None:
+ _details['securityContext']['fsGroup'] = security_context_fs_group
+
+ if security_context_fs_group_change_policy is not None:
+ _details['securityContext']['fsGroupChangePolicy'] = security_context_fs_group_change_policy
+
+ _details['securityContext']['securityContextType'] = 'LINUX'
+
client = cli_util.build_client('container_instances', 'container_instance', ctx)
result = client.create_container_instance(
create_container_instance_details=_details,
diff --git a/services/core/src/oci_cli_compute/computepic_cli_extended.py b/services/core/src/oci_cli_compute/computepic_cli_extended.py
index f49a747f5..34cc7ada5 100644
--- a/services/core/src/oci_cli_compute/computepic_cli_extended.py
+++ b/services/core/src/oci_cli_compute/computepic_cli_extended.py
@@ -157,3 +157,35 @@ def create_app_catalog_subscription(ctx, **kwargs):
# Move commands under 'oci compute firmware-bundles-collection' -> 'oci compute firmware-bundle'
compute_cli.compute_root_group.commands.pop(compute_cli.firmware_bundles_collection_group.name)
compute_cli.firmware_bundle_group.add_command(compute_cli.list_firmware_bundles)
+
+
+# Remove create-compute-cluster-compute-bare-metal-host-placement-constraint-details from oci compute compute-cluster
+compute_cli.compute_cluster_group.commands.pop(compute_cli.create_compute_cluster_compute_bare_metal_host_placement_constraint_details.name)
+
+
+# Remove create-compute-cluster-compute-cluster-placement-constraint-details from oci compute compute-cluster
+compute_cli.compute_cluster_group.commands.pop(compute_cli.create_compute_cluster_compute_cluster_placement_constraint_details.name)
+
+
+# Remove create-compute-cluster-host-group-placement-constraint-details from oci compute compute-cluster
+compute_cli.compute_cluster_group.commands.pop(compute_cli.create_compute_cluster_host_group_placement_constraint_details.name)
+
+
+# Remove update-compute-cluster-compute-bare-metal-host-placement-constraint-details from oci compute compute-cluster
+compute_cli.compute_cluster_group.commands.pop(compute_cli.update_compute_cluster_compute_bare_metal_host_placement_constraint_details.name)
+
+
+# Remove update-compute-cluster-compute-cluster-placement-constraint-details from oci compute compute-cluster
+compute_cli.compute_cluster_group.commands.pop(compute_cli.update_compute_cluster_compute_cluster_placement_constraint_details.name)
+
+
+# Remove update-compute-cluster-host-group-placement-constraint-details from oci compute compute-cluster
+compute_cli.compute_cluster_group.commands.pop(compute_cli.update_compute_cluster_host_group_placement_constraint_details.name)
+
+
+# Remove create-dedicated-vm-host-compute-cluster-placement-constraint-details from oci compute dedicated-vm-host
+compute_cli.dedicated_vm_host_group.commands.pop(compute_cli.create_dedicated_vm_host_compute_cluster_placement_constraint_details.name)
+
+
+# Remove launch-instance-compute-cluster-placement-constraint-details from oci compute instance
+compute_cli.instance_group.commands.pop(compute_cli.launch_instance_compute_cluster_placement_constraint_details.name)
diff --git a/services/core/src/oci_cli_compute/generated/compute_cli.py b/services/core/src/oci_cli_compute/generated/compute_cli.py
index fd7b84642..08cb551a0 100644
--- a/services/core/src/oci_cli_compute/generated/compute_cli.py
+++ b/services/core/src/oci_cli_compute/generated/compute_cli.py
@@ -236,13 +236,11 @@ def compute_capacity_topology_group():
pass
-@click.command(cli_util.override('compute.compute_cluster_group.command_name', 'compute-cluster'), cls=CommandGroupWithAlias, help="""The data for creating a [compute cluster]. A compute cluster is an empty remote direct memory access (RDMA) network group
+@click.command(cli_util.override('compute.compute_cluster_group.command_name', 'compute-cluster'), cls=CommandGroupWithAlias, help="""The data for creating a [compute cluster].
-After the compute cluster is created, you can use the compute cluster's OCID with the [LaunchInstance] operation to create instances in the compute cluster. The instances must be created in the same compartment and availability domain as the cluster.
-
-Use compute clusters when you want to manage instances in the cluster individually in the RDMA network group.
+After the compute cluster is created, you can use the compute cluster's OCID to create Instance, GPU Memory Cluster or Instance Pool resources within the compute cluster. These resources must be created in the same compartment and availability domain as the cluster.
-For details about creating a cluster network that uses instance pools to manage groups of identical instances, see [CreateClusterNetworkDetails].""")
+Use `COMPUTE_CLUSTER` type when using placementConstraintDetails.""")
@cli_util.help_option_group
def compute_cluster_group():
pass
@@ -2021,6 +2019,270 @@ def create_compute_capacity_topology_create_dedicated_capacity_source_details(ct
Example: `{\"Operations\": {\"CostCenter\": \"42\"}}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
@cli_util.option('--freeform-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags].
+Example: `{\"Department\": \"Finance\"}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
+@cli_util.option('--placement-constraint-details', 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(["ACTIVE", "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 ACTIVE --wait-for-state DELETED 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({'defined-tags': {'module': 'core', 'class': 'dict(str, dict(str, object))'}, 'freeform-tags': {'module': 'core', 'class': 'dict(str, string)'}, 'placement-constraint-details': {'module': 'core', 'class': 'PlacementConstraintDetails'}})
+@cli_util.help_option
+@click.pass_context
+@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'defined-tags': {'module': 'core', 'class': 'dict(str, dict(str, object))'}, 'freeform-tags': {'module': 'core', 'class': 'dict(str, string)'}, 'placement-constraint-details': {'module': 'core', 'class': 'PlacementConstraintDetails'}}, output_type={'module': 'core', 'class': 'ComputeCluster'})
+@cli_util.wrap_exceptions
+def create_compute_cluster(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, availability_domain, compartment_id, display_name, defined_tags, freeform_tags, placement_constraint_details):
+
+ kwargs = {}
+ kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
+
+ _details = {}
+ _details['availabilityDomain'] = availability_domain
+ _details['compartmentId'] = compartment_id
+
+ if display_name is not None:
+ _details['displayName'] = display_name
+
+ if defined_tags is not None:
+ _details['definedTags'] = cli_util.parse_json_parameter("defined_tags", defined_tags)
+
+ if freeform_tags is not None:
+ _details['freeformTags'] = cli_util.parse_json_parameter("freeform_tags", freeform_tags)
+
+ if placement_constraint_details is not None:
+ _details['placementConstraintDetails'] = cli_util.parse_json_parameter("placement_constraint_details", placement_constraint_details)
+
+ client = cli_util.build_client('core', 'compute', ctx)
+ result = client.create_compute_cluster(
+ create_compute_cluster_details=_details,
+ **kwargs
+ )
+ if wait_for_state:
+
+ if hasattr(client, 'get_compute_cluster') and callable(getattr(client, 'get_compute_cluster')):
+ 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_compute_cluster(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)
+
+
+@compute_cluster_group.command(name=cli_util.override('compute.create_compute_cluster_host_group_placement_constraint_details.command_name', 'create-compute-cluster-host-group-placement-constraint-details'), help=u"""Creates an empty [compute cluster]. A compute cluster is a remote direct memory access (RDMA) network group.
+
+After the compute cluster is created, you can use the compute cluster's OCID with the [LaunchInstance] operation to create instances in the compute cluster. The instances must be created in the same compartment and availability domain as the cluster.
+
+Use compute clusters when you want to manage instances in the cluster individually in the RDMA network group.
+
+If you want predictable capacity for a specific number of identical instances that are managed as a group, create a cluster network that uses instance pools by using the [CreateClusterNetwork] operation. \n[Command Reference](createComputeCluster)""")
+@cli_util.option('--availability-domain', required=True, help=u"""The availability domain to place the compute cluster in.
+
+Example: `Uocm:PHX-AD-1`""")
+@cli_util.option('--compartment-id', required=True, help=u"""The [OCID] of the compartment.""")
+@cli_util.option('--placement-constraint-details-compute-host-group-id', required=True, help=u"""The OCID of the compute host group. This is only available for dedicated capacity customers.""")
+@cli_util.option('--display-name', help=u"""A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.""")
+@cli_util.option('--defined-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags].
+
+Example: `{\"Operations\": {\"CostCenter\": \"42\"}}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
+@cli_util.option('--freeform-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags].
+
+Example: `{\"Department\": \"Finance\"}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
+@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACTIVE", "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 ACTIVE --wait-for-state DELETED 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({'defined-tags': {'module': 'core', 'class': 'dict(str, dict(str, object))'}, 'freeform-tags': {'module': 'core', 'class': 'dict(str, string)'}})
+@cli_util.help_option
+@click.pass_context
+@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'defined-tags': {'module': 'core', 'class': 'dict(str, dict(str, object))'}, 'freeform-tags': {'module': 'core', 'class': 'dict(str, string)'}}, output_type={'module': 'core', 'class': 'ComputeCluster'})
+@cli_util.wrap_exceptions
+def create_compute_cluster_host_group_placement_constraint_details(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, availability_domain, compartment_id, placement_constraint_details_compute_host_group_id, display_name, defined_tags, freeform_tags):
+
+ kwargs = {}
+ kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
+
+ _details = {}
+ _details['placementConstraintDetails'] = {}
+ _details['availabilityDomain'] = availability_domain
+ _details['compartmentId'] = compartment_id
+ _details['placementConstraintDetails']['computeHostGroupId'] = placement_constraint_details_compute_host_group_id
+
+ if display_name is not None:
+ _details['displayName'] = display_name
+
+ if defined_tags is not None:
+ _details['definedTags'] = cli_util.parse_json_parameter("defined_tags", defined_tags)
+
+ if freeform_tags is not None:
+ _details['freeformTags'] = cli_util.parse_json_parameter("freeform_tags", freeform_tags)
+
+ _details['placementConstraintDetails']['type'] = 'HOST_GROUP'
+
+ client = cli_util.build_client('core', 'compute', ctx)
+ result = client.create_compute_cluster(
+ create_compute_cluster_details=_details,
+ **kwargs
+ )
+ if wait_for_state:
+
+ if hasattr(client, 'get_compute_cluster') and callable(getattr(client, 'get_compute_cluster')):
+ 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_compute_cluster(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)
+
+
+@compute_cluster_group.command(name=cli_util.override('compute.create_compute_cluster_compute_cluster_placement_constraint_details.command_name', 'create-compute-cluster-compute-cluster-placement-constraint-details'), help=u"""Creates an empty [compute cluster]. A compute cluster is a remote direct memory access (RDMA) network group.
+
+After the compute cluster is created, you can use the compute cluster's OCID with the [LaunchInstance] operation to create instances in the compute cluster. The instances must be created in the same compartment and availability domain as the cluster.
+
+Use compute clusters when you want to manage instances in the cluster individually in the RDMA network group.
+
+If you want predictable capacity for a specific number of identical instances that are managed as a group, create a cluster network that uses instance pools by using the [CreateClusterNetwork] operation. \n[Command Reference](createComputeCluster)""")
+@cli_util.option('--availability-domain', required=True, help=u"""The availability domain to place the compute cluster in.
+
+Example: `Uocm:PHX-AD-1`""")
+@cli_util.option('--compartment-id', required=True, help=u"""The [OCID] of the compartment.""")
+@cli_util.option('--display-name', help=u"""A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.""")
+@cli_util.option('--defined-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags].
+
+Example: `{\"Operations\": {\"CostCenter\": \"42\"}}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
+@cli_util.option('--freeform-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags].
+
+Example: `{\"Department\": \"Finance\"}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
+@cli_util.option('--placement-constraint-details-hpc-island-id', help=u"""The [OCID] of the HPC island for the compute cluster.
+
+This field cannot be updated after creation of the compute cluster.""")
+@cli_util.option('--placement-constraint-details-target-network-block-ids', type=custom_types.CLI_COMPLEX_TYPE, help=u"""The list of target network block OCIDs to constrain placement.
+
+If `targetNetworkBlockIds` is provided, the `hpcIslandId` must be set on the compute cluster, and the provided network blocks must belong to that same HPC island.
+
+The ordering of the array will be preserved. Ensure that all items in the array are unique.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
+@cli_util.option('--placement-constraint-details-target-memory-fabric-ids', type=custom_types.CLI_COMPLEX_TYPE, help=u"""The list of target GPU memory fabric OCIDs to constrain placement.
+
+If GMFs are passed in, the `hpcIslandId` must be set on the compute cluster, and the provided GMFs must belong to that same HPC island.
+
+The ordering of the array will be preserved. Ensure that all items in the array are unique.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
+@cli_util.option('--placement-constraint-details-logical-placement-constraint', type=custom_types.CliCaseInsensitiveChoice(["SINGLE_TIER", "SINGLE_BLOCK", "PACKED_DISTRIBUTION_MULTI_BLOCK"]), help=u"""The logical placement strategy to apply. Allowed values are `SINGLE_TIER`, `SINGLE_BLOCK`, and `PACKED_DISTRIBUTION_MULTI_BLOCK`.""")
+@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACTIVE", "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 ACTIVE --wait-for-state DELETED 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({'defined-tags': {'module': 'core', 'class': 'dict(str, dict(str, object))'}, 'freeform-tags': {'module': 'core', 'class': 'dict(str, string)'}, 'placement-constraint-details-target-network-block-ids': {'module': 'core', 'class': 'list[string]'}, 'placement-constraint-details-target-memory-fabric-ids': {'module': 'core', 'class': 'list[string]'}})
+@cli_util.help_option
+@click.pass_context
+@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'defined-tags': {'module': 'core', 'class': 'dict(str, dict(str, object))'}, 'freeform-tags': {'module': 'core', 'class': 'dict(str, string)'}, 'placement-constraint-details-target-network-block-ids': {'module': 'core', 'class': 'list[string]'}, 'placement-constraint-details-target-memory-fabric-ids': {'module': 'core', 'class': 'list[string]'}}, output_type={'module': 'core', 'class': 'ComputeCluster'})
+@cli_util.wrap_exceptions
+def create_compute_cluster_compute_cluster_placement_constraint_details(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, availability_domain, compartment_id, display_name, defined_tags, freeform_tags, placement_constraint_details_hpc_island_id, placement_constraint_details_target_network_block_ids, placement_constraint_details_target_memory_fabric_ids, placement_constraint_details_logical_placement_constraint):
+
+ kwargs = {}
+ kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
+
+ _details = {}
+ _details['placementConstraintDetails'] = {}
+ _details['availabilityDomain'] = availability_domain
+ _details['compartmentId'] = compartment_id
+
+ if display_name is not None:
+ _details['displayName'] = display_name
+
+ if defined_tags is not None:
+ _details['definedTags'] = cli_util.parse_json_parameter("defined_tags", defined_tags)
+
+ if freeform_tags is not None:
+ _details['freeformTags'] = cli_util.parse_json_parameter("freeform_tags", freeform_tags)
+
+ if placement_constraint_details_hpc_island_id is not None:
+ _details['placementConstraintDetails']['hpcIslandId'] = placement_constraint_details_hpc_island_id
+
+ if placement_constraint_details_target_network_block_ids is not None:
+ _details['placementConstraintDetails']['targetNetworkBlockIds'] = cli_util.parse_json_parameter("placement_constraint_details_target_network_block_ids", placement_constraint_details_target_network_block_ids)
+
+ if placement_constraint_details_target_memory_fabric_ids is not None:
+ _details['placementConstraintDetails']['targetMemoryFabricIds'] = cli_util.parse_json_parameter("placement_constraint_details_target_memory_fabric_ids", placement_constraint_details_target_memory_fabric_ids)
+
+ if placement_constraint_details_logical_placement_constraint is not None:
+ _details['placementConstraintDetails']['logicalPlacementConstraint'] = placement_constraint_details_logical_placement_constraint
+
+ _details['placementConstraintDetails']['type'] = 'COMPUTE_CLUSTER'
+
+ client = cli_util.build_client('core', 'compute', ctx)
+ result = client.create_compute_cluster(
+ create_compute_cluster_details=_details,
+ **kwargs
+ )
+ if wait_for_state:
+
+ if hasattr(client, 'get_compute_cluster') and callable(getattr(client, 'get_compute_cluster')):
+ 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_compute_cluster(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)
+
+
+@compute_cluster_group.command(name=cli_util.override('compute.create_compute_cluster_compute_bare_metal_host_placement_constraint_details.command_name', 'create-compute-cluster-compute-bare-metal-host-placement-constraint-details'), help=u"""Creates an empty [compute cluster]. A compute cluster is a remote direct memory access (RDMA) network group.
+
+After the compute cluster is created, you can use the compute cluster's OCID with the [LaunchInstance] operation to create instances in the compute cluster. The instances must be created in the same compartment and availability domain as the cluster.
+
+Use compute clusters when you want to manage instances in the cluster individually in the RDMA network group.
+
+If you want predictable capacity for a specific number of identical instances that are managed as a group, create a cluster network that uses instance pools by using the [CreateClusterNetwork] operation. \n[Command Reference](createComputeCluster)""")
+@cli_util.option('--availability-domain', required=True, help=u"""The availability domain to place the compute cluster in.
+
+Example: `Uocm:PHX-AD-1`""")
+@cli_util.option('--compartment-id', required=True, help=u"""The [OCID] of the compartment.""")
+@cli_util.option('--placement-constraint-details-compute-bare-metal-host-id', required=True, help=u"""The OCID of the compute bare metal host. This is only available for dedicated capacity customers.""")
+@cli_util.option('--display-name', help=u"""A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.""")
+@cli_util.option('--defined-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags].
+
+Example: `{\"Operations\": {\"CostCenter\": \"42\"}}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
+@cli_util.option('--freeform-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags].
+
Example: `{\"Department\": \"Finance\"}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACTIVE", "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 ACTIVE --wait-for-state DELETED 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.""")
@@ -2030,14 +2292,16 @@ def create_compute_capacity_topology_create_dedicated_capacity_source_details(ct
@click.pass_context
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'defined-tags': {'module': 'core', 'class': 'dict(str, dict(str, object))'}, 'freeform-tags': {'module': 'core', 'class': 'dict(str, string)'}}, output_type={'module': 'core', 'class': 'ComputeCluster'})
@cli_util.wrap_exceptions
-def create_compute_cluster(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, availability_domain, compartment_id, display_name, defined_tags, freeform_tags):
+def create_compute_cluster_compute_bare_metal_host_placement_constraint_details(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, availability_domain, compartment_id, placement_constraint_details_compute_bare_metal_host_id, display_name, defined_tags, freeform_tags):
kwargs = {}
kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
_details = {}
+ _details['placementConstraintDetails'] = {}
_details['availabilityDomain'] = availability_domain
_details['compartmentId'] = compartment_id
+ _details['placementConstraintDetails']['computeBareMetalHostId'] = placement_constraint_details_compute_bare_metal_host_id
if display_name is not None:
_details['displayName'] = display_name
@@ -2048,6 +2312,8 @@ def create_compute_cluster(ctx, from_json, wait_for_state, max_wait_seconds, wai
if freeform_tags is not None:
_details['freeformTags'] = cli_util.parse_json_parameter("freeform_tags", freeform_tags)
+ _details['placementConstraintDetails']['type'] = 'COMPUTE_BARE_METAL_HOST'
+
client = cli_util.build_client('core', 'compute', ctx)
result = client.create_compute_cluster(
create_compute_cluster_details=_details,
@@ -2494,13 +2760,12 @@ def create_dedicated_vm_host_host_group_placement_constraint_details(ctx, from_j
cli_util.render_response(result, ctx)
-@dedicated_vm_host_group.command(name=cli_util.override('compute.create_dedicated_vm_host_compute_bare_metal_host_placement_constraint_details.command_name', 'create-dedicated-vm-host-compute-bare-metal-host-placement-constraint-details'), help=u"""Creates a new dedicated virtual machine host in the specified compartment and the specified availability domain. Dedicated virtual machine hosts enable you to run your Compute virtual machine (VM) instances on dedicated servers that are a single tenant and not shared with other customers. For more information, see [Dedicated Virtual Machine Hosts]. \n[Command Reference](createDedicatedVmHost)""")
+@dedicated_vm_host_group.command(name=cli_util.override('compute.create_dedicated_vm_host_compute_cluster_placement_constraint_details.command_name', 'create-dedicated-vm-host-compute-cluster-placement-constraint-details'), help=u"""Creates a new dedicated virtual machine host in the specified compartment and the specified availability domain. Dedicated virtual machine hosts enable you to run your Compute virtual machine (VM) instances on dedicated servers that are a single tenant and not shared with other customers. For more information, see [Dedicated Virtual Machine Hosts]. \n[Command Reference](createDedicatedVmHost)""")
@cli_util.option('--availability-domain', required=True, help=u"""The availability domain of the dedicated virtual machine host.
Example: `Uocm:PHX-AD-1`""")
@cli_util.option('--compartment-id', required=True, help=u"""The OCID of the compartment.""")
@cli_util.option('--dedicated-vm-host-shape', required=True, help=u"""The dedicated virtual machine host shape. The shape determines the number of CPUs and other resources available for VM instances launched on the dedicated virtual machine host.""")
-@cli_util.option('--placement-constraint-details-compute-bare-metal-host-id', required=True, help=u"""The OCID of the compute bare metal host. This is only available for dedicated capacity customers.""")
@cli_util.option('--defined-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags].
Example: `{\"Operations\": {\"CostCenter\": \"42\"}}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
@@ -2515,15 +2780,29 @@ def create_dedicated_vm_host_host_group_placement_constraint_details(ctx, from_j
Example: `{\"Department\": \"Finance\"}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
@cli_util.option('--capacity-config', help=u"""The capacity configuration selected to be configured for the Dedicated Virtual Machine host. Run [ListDedicatedVmHostShapes] API first to see the capacity configuration options.""")
@cli_util.option('--is-memory-encryption-enabled', type=click.BOOL, help=u"""Specifies if the Dedicated Virtual Machine Host (DVMH) is restricted to running only Confidential VMs. If `true`, only Confidential VMs can be launched. If `false`, Confidential VMs cannot be launched.""")
+@cli_util.option('--placement-constraint-details-hpc-island-id', help=u"""The [OCID] of the HPC island for the compute cluster.
+
+This field cannot be updated after creation of the compute cluster.""")
+@cli_util.option('--placement-constraint-details-target-network-block-ids', type=custom_types.CLI_COMPLEX_TYPE, help=u"""The list of target network block OCIDs to constrain placement.
+
+If `targetNetworkBlockIds` is provided, the `hpcIslandId` must be set on the compute cluster, and the provided network blocks must belong to that same HPC island.
+
+The ordering of the array will be preserved. Ensure that all items in the array are unique.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
+@cli_util.option('--placement-constraint-details-target-memory-fabric-ids', type=custom_types.CLI_COMPLEX_TYPE, help=u"""The list of target GPU memory fabric OCIDs to constrain placement.
+
+If GMFs are passed in, the `hpcIslandId` must be set on the compute cluster, and the provided GMFs must belong to that same HPC island.
+
+The ordering of the array will be preserved. Ensure that all items in the array are unique.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
+@cli_util.option('--placement-constraint-details-logical-placement-constraint', type=custom_types.CliCaseInsensitiveChoice(["SINGLE_TIER", "SINGLE_BLOCK", "PACKED_DISTRIBUTION_MULTI_BLOCK"]), help=u"""The logical placement strategy to apply. Allowed values are `SINGLE_TIER`, `SINGLE_BLOCK`, and `PACKED_DISTRIBUTION_MULTI_BLOCK`.""")
@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED"]), 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 CREATING --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({'defined-tags': {'module': 'core', 'class': 'dict(str, dict(str, object))'}, 'freeform-tags': {'module': 'core', 'class': 'dict(str, string)'}})
+@json_skeleton_utils.get_cli_json_input_option({'defined-tags': {'module': 'core', 'class': 'dict(str, dict(str, object))'}, 'freeform-tags': {'module': 'core', 'class': 'dict(str, string)'}, 'placement-constraint-details-target-network-block-ids': {'module': 'core', 'class': 'list[string]'}, 'placement-constraint-details-target-memory-fabric-ids': {'module': 'core', 'class': 'list[string]'}})
@cli_util.help_option
@click.pass_context
-@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'defined-tags': {'module': 'core', 'class': 'dict(str, dict(str, object))'}, 'freeform-tags': {'module': 'core', 'class': 'dict(str, string)'}}, output_type={'module': 'core', 'class': 'DedicatedVmHost'})
+@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'defined-tags': {'module': 'core', 'class': 'dict(str, dict(str, object))'}, 'freeform-tags': {'module': 'core', 'class': 'dict(str, string)'}, 'placement-constraint-details-target-network-block-ids': {'module': 'core', 'class': 'list[string]'}, 'placement-constraint-details-target-memory-fabric-ids': {'module': 'core', 'class': 'list[string]'}}, output_type={'module': 'core', 'class': 'DedicatedVmHost'})
@cli_util.wrap_exceptions
-def create_dedicated_vm_host_compute_bare_metal_host_placement_constraint_details(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, availability_domain, compartment_id, dedicated_vm_host_shape, placement_constraint_details_compute_bare_metal_host_id, defined_tags, display_name, fault_domain, freeform_tags, capacity_config, is_memory_encryption_enabled):
+def create_dedicated_vm_host_compute_cluster_placement_constraint_details(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, availability_domain, compartment_id, dedicated_vm_host_shape, defined_tags, display_name, fault_domain, freeform_tags, capacity_config, is_memory_encryption_enabled, placement_constraint_details_hpc_island_id, placement_constraint_details_target_network_block_ids, placement_constraint_details_target_memory_fabric_ids, placement_constraint_details_logical_placement_constraint):
kwargs = {}
kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
@@ -2533,7 +2812,6 @@ def create_dedicated_vm_host_compute_bare_metal_host_placement_constraint_detail
_details['availabilityDomain'] = availability_domain
_details['compartmentId'] = compartment_id
_details['dedicatedVmHostShape'] = dedicated_vm_host_shape
- _details['placementConstraintDetails']['computeBareMetalHostId'] = placement_constraint_details_compute_bare_metal_host_id
if defined_tags is not None:
_details['definedTags'] = cli_util.parse_json_parameter("defined_tags", defined_tags)
@@ -2553,7 +2831,111 @@ def create_dedicated_vm_host_compute_bare_metal_host_placement_constraint_detail
if is_memory_encryption_enabled is not None:
_details['isMemoryEncryptionEnabled'] = is_memory_encryption_enabled
- _details['placementConstraintDetails']['type'] = 'COMPUTE_BARE_METAL_HOST'
+ if placement_constraint_details_hpc_island_id is not None:
+ _details['placementConstraintDetails']['hpcIslandId'] = placement_constraint_details_hpc_island_id
+
+ if placement_constraint_details_target_network_block_ids is not None:
+ _details['placementConstraintDetails']['targetNetworkBlockIds'] = cli_util.parse_json_parameter("placement_constraint_details_target_network_block_ids", placement_constraint_details_target_network_block_ids)
+
+ if placement_constraint_details_target_memory_fabric_ids is not None:
+ _details['placementConstraintDetails']['targetMemoryFabricIds'] = cli_util.parse_json_parameter("placement_constraint_details_target_memory_fabric_ids", placement_constraint_details_target_memory_fabric_ids)
+
+ if placement_constraint_details_logical_placement_constraint is not None:
+ _details['placementConstraintDetails']['logicalPlacementConstraint'] = placement_constraint_details_logical_placement_constraint
+
+ _details['placementConstraintDetails']['type'] = 'COMPUTE_CLUSTER'
+
+ client = cli_util.build_client('core', 'compute', ctx)
+ result = client.create_dedicated_vm_host(
+ create_dedicated_vm_host_details=_details,
+ **kwargs
+ )
+ if wait_for_state:
+
+ if hasattr(client, 'get_dedicated_vm_host') and callable(getattr(client, 'get_dedicated_vm_host')):
+ 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_dedicated_vm_host(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)
+
+
+@dedicated_vm_host_group.command(name=cli_util.override('compute.create_dedicated_vm_host_compute_bare_metal_host_placement_constraint_details.command_name', 'create-dedicated-vm-host-compute-bare-metal-host-placement-constraint-details'), help=u"""Creates a new dedicated virtual machine host in the specified compartment and the specified availability domain. Dedicated virtual machine hosts enable you to run your Compute virtual machine (VM) instances on dedicated servers that are a single tenant and not shared with other customers. For more information, see [Dedicated Virtual Machine Hosts]. \n[Command Reference](createDedicatedVmHost)""")
+@cli_util.option('--availability-domain', required=True, help=u"""The availability domain of the dedicated virtual machine host.
+
+Example: `Uocm:PHX-AD-1`""")
+@cli_util.option('--compartment-id', required=True, help=u"""The OCID of the compartment.""")
+@cli_util.option('--dedicated-vm-host-shape', required=True, help=u"""The dedicated virtual machine host shape. The shape determines the number of CPUs and other resources available for VM instances launched on the dedicated virtual machine host.""")
+@cli_util.option('--placement-constraint-details-compute-bare-metal-host-id', required=True, help=u"""The OCID of the compute bare metal host. This is only available for dedicated capacity customers.""")
+@cli_util.option('--defined-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags].
+
+Example: `{\"Operations\": {\"CostCenter\": \"42\"}}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
+@cli_util.option('--display-name', help=u"""A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.""")
+@cli_util.option('--fault-domain', help=u"""The fault domain for the dedicated virtual machine host's assigned instances. For more information, see [Fault Domains]. If you do not specify the fault domain, the system selects one for you. To change the fault domain for a dedicated virtual machine host, delete it and create a new dedicated virtual machine host in the preferred fault domain.
+
+To get a list of fault domains, use the `ListFaultDomains` operation in the [Identity and Access Management Service API].
+
+Example: `FAULT-DOMAIN-1`""")
+@cli_util.option('--freeform-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags].
+
+Example: `{\"Department\": \"Finance\"}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
+@cli_util.option('--capacity-config', help=u"""The capacity configuration selected to be configured for the Dedicated Virtual Machine host. Run [ListDedicatedVmHostShapes] API first to see the capacity configuration options.""")
+@cli_util.option('--is-memory-encryption-enabled', type=click.BOOL, help=u"""Specifies if the Dedicated Virtual Machine Host (DVMH) is restricted to running only Confidential VMs. If `true`, only Confidential VMs can be launched. If `false`, Confidential VMs cannot be launched.""")
+@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED"]), 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 CREATING --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({'defined-tags': {'module': 'core', 'class': 'dict(str, dict(str, object))'}, 'freeform-tags': {'module': 'core', 'class': 'dict(str, string)'}})
+@cli_util.help_option
+@click.pass_context
+@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'defined-tags': {'module': 'core', 'class': 'dict(str, dict(str, object))'}, 'freeform-tags': {'module': 'core', 'class': 'dict(str, string)'}}, output_type={'module': 'core', 'class': 'DedicatedVmHost'})
+@cli_util.wrap_exceptions
+def create_dedicated_vm_host_compute_bare_metal_host_placement_constraint_details(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, availability_domain, compartment_id, dedicated_vm_host_shape, placement_constraint_details_compute_bare_metal_host_id, defined_tags, display_name, fault_domain, freeform_tags, capacity_config, is_memory_encryption_enabled):
+
+ kwargs = {}
+ kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
+
+ _details = {}
+ _details['placementConstraintDetails'] = {}
+ _details['availabilityDomain'] = availability_domain
+ _details['compartmentId'] = compartment_id
+ _details['dedicatedVmHostShape'] = dedicated_vm_host_shape
+ _details['placementConstraintDetails']['computeBareMetalHostId'] = placement_constraint_details_compute_bare_metal_host_id
+
+ if defined_tags is not None:
+ _details['definedTags'] = cli_util.parse_json_parameter("defined_tags", defined_tags)
+
+ if display_name is not None:
+ _details['displayName'] = display_name
+
+ if fault_domain is not None:
+ _details['faultDomain'] = fault_domain
+
+ if freeform_tags is not None:
+ _details['freeformTags'] = cli_util.parse_json_parameter("freeform_tags", freeform_tags)
+
+ if capacity_config is not None:
+ _details['capacityConfig'] = capacity_config
+
+ if is_memory_encryption_enabled is not None:
+ _details['isMemoryEncryptionEnabled'] = is_memory_encryption_enabled
+
+ _details['placementConstraintDetails']['type'] = 'COMPUTE_BARE_METAL_HOST'
client = cli_util.build_client('core', 'compute', ctx)
result = client.create_dedicated_vm_host(
@@ -5684,24 +6066,289 @@ def launch_instance_instance_source_via_image_details(ctx, from_json, wait_for_s
@cli_util.option('--instance-configuration-id', help=u"""The OCID of the Instance Configuration containing instance launch details. Any other fields supplied in this instance launch request will override the details stored in the Instance Configuration for this instance launch.""")
@cli_util.option('--licensing-configs', type=custom_types.CLI_COMPLEX_TYPE, help=u"""List of licensing configurations associated with target launch values.
-This option is a JSON list with items of type LaunchInstanceLicensingConfig. For documentation on LaunchInstanceLicensingConfig please see our API reference: https://docs.oracle.com/en-us/iaas/api/#/en/iaas/20160918/datatypes/LaunchInstanceLicensingConfig.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
+This option is a JSON list with items of type LaunchInstanceLicensingConfig. For documentation on LaunchInstanceLicensingConfig please see our API reference: https://docs.oracle.com/en-us/iaas/api/#/en/iaas/20160918/datatypes/LaunchInstanceLicensingConfig.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
+@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["MOVING", "PROVISIONING", "RUNNING", "STARTING", "STOPPING", "STOPPED", "CREATING_IMAGE", "TERMINATING", "TERMINATED"]), 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 MOVING --wait-for-state TERMINATED 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({'create-vnic-details': {'module': 'core', 'class': 'CreateVnicDetails'}, 'defined-tags': {'module': 'core', 'class': 'dict(str, dict(str, object))'}, 'security-attributes': {'module': 'core', 'class': 'dict(str, dict(str, object))'}, 'extended-metadata': {'module': 'core', 'class': 'dict(str, object)'}, 'freeform-tags': {'module': 'core', 'class': 'dict(str, string)'}, 'launch-options': {'module': 'core', 'class': 'LaunchOptions'}, 'instance-options': {'module': 'core', 'class': 'InstanceOptions'}, 'availability-config': {'module': 'core', 'class': 'LaunchInstanceAvailabilityConfigDetails'}, 'preemptible-instance-config': {'module': 'core', 'class': 'PreemptibleInstanceConfigDetails'}, 'metadata': {'module': 'core', 'class': 'dict(str, string)'}, 'agent-config': {'module': 'core', 'class': 'LaunchInstanceAgentConfigDetails'}, 'shape-config': {'module': 'core', 'class': 'LaunchInstanceShapeConfigDetails'}, 'launch-volume-attachments': {'module': 'core', 'class': 'list[LaunchAttachVolumeDetails]'}, 'platform-config': {'module': 'core', 'class': 'LaunchInstancePlatformConfig'}, 'placement-constraint-details': {'module': 'core', 'class': 'PlacementConstraintDetails'}, 'licensing-configs': {'module': 'core', 'class': 'list[LaunchInstanceLicensingConfig]'}})
+@cli_util.help_option
+@click.pass_context
+@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'create-vnic-details': {'module': 'core', 'class': 'CreateVnicDetails'}, 'defined-tags': {'module': 'core', 'class': 'dict(str, dict(str, object))'}, 'security-attributes': {'module': 'core', 'class': 'dict(str, dict(str, object))'}, 'extended-metadata': {'module': 'core', 'class': 'dict(str, object)'}, 'freeform-tags': {'module': 'core', 'class': 'dict(str, string)'}, 'launch-options': {'module': 'core', 'class': 'LaunchOptions'}, 'instance-options': {'module': 'core', 'class': 'InstanceOptions'}, 'availability-config': {'module': 'core', 'class': 'LaunchInstanceAvailabilityConfigDetails'}, 'preemptible-instance-config': {'module': 'core', 'class': 'PreemptibleInstanceConfigDetails'}, 'metadata': {'module': 'core', 'class': 'dict(str, string)'}, 'agent-config': {'module': 'core', 'class': 'LaunchInstanceAgentConfigDetails'}, 'shape-config': {'module': 'core', 'class': 'LaunchInstanceShapeConfigDetails'}, 'launch-volume-attachments': {'module': 'core', 'class': 'list[LaunchAttachVolumeDetails]'}, 'platform-config': {'module': 'core', 'class': 'LaunchInstancePlatformConfig'}, 'placement-constraint-details': {'module': 'core', 'class': 'PlacementConstraintDetails'}, 'licensing-configs': {'module': 'core', 'class': 'list[LaunchInstanceLicensingConfig]'}}, output_type={'module': 'core', 'class': 'Instance'})
+@cli_util.wrap_exceptions
+def launch_instance_instance_source_via_boot_volume_details(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, availability_domain, compartment_id, source_details_boot_volume_id, capacity_reservation_id, create_vnic_details, dedicated_vm_host_id, defined_tags, security_attributes, display_name, extended_metadata, fault_domain, cluster_placement_group_id, freeform_tags, compute_cluster_id, hostname_label, image_id, ipxe_script_file, launch_options, instance_options, availability_config, preemptible_instance_config, metadata, agent_config, shape, shape_config, subnet_id, launch_volume_attachments, is_pv_encryption_in_transit_enabled, platform_config, placement_constraint_details, is_ai_enterprise_enabled, instance_configuration_id, licensing_configs):
+
+ kwargs = {}
+
+ _details = {}
+ _details['sourceDetails'] = {}
+ _details['availabilityDomain'] = availability_domain
+ _details['compartmentId'] = compartment_id
+ _details['sourceDetails']['bootVolumeId'] = source_details_boot_volume_id
+
+ if capacity_reservation_id is not None:
+ _details['capacityReservationId'] = capacity_reservation_id
+
+ if create_vnic_details is not None:
+ _details['createVnicDetails'] = cli_util.parse_json_parameter("create_vnic_details", create_vnic_details)
+
+ if dedicated_vm_host_id is not None:
+ _details['dedicatedVmHostId'] = dedicated_vm_host_id
+
+ if defined_tags is not None:
+ _details['definedTags'] = cli_util.parse_json_parameter("defined_tags", defined_tags)
+
+ if security_attributes is not None:
+ _details['securityAttributes'] = cli_util.parse_json_parameter("security_attributes", security_attributes)
+
+ if display_name is not None:
+ _details['displayName'] = display_name
+
+ if extended_metadata is not None:
+ _details['extendedMetadata'] = cli_util.parse_json_parameter("extended_metadata", extended_metadata)
+
+ if fault_domain is not None:
+ _details['faultDomain'] = fault_domain
+
+ if cluster_placement_group_id is not None:
+ _details['clusterPlacementGroupId'] = cluster_placement_group_id
+
+ if freeform_tags is not None:
+ _details['freeformTags'] = cli_util.parse_json_parameter("freeform_tags", freeform_tags)
+
+ if compute_cluster_id is not None:
+ _details['computeClusterId'] = compute_cluster_id
+
+ if hostname_label is not None:
+ _details['hostnameLabel'] = hostname_label
+
+ if image_id is not None:
+ _details['imageId'] = image_id
+
+ if ipxe_script_file is not None:
+ _details['ipxeScript'] = ipxe_script_file.read()
+
+ if launch_options is not None:
+ _details['launchOptions'] = cli_util.parse_json_parameter("launch_options", launch_options)
+
+ if instance_options is not None:
+ _details['instanceOptions'] = cli_util.parse_json_parameter("instance_options", instance_options)
+
+ if availability_config is not None:
+ _details['availabilityConfig'] = cli_util.parse_json_parameter("availability_config", availability_config)
+
+ if preemptible_instance_config is not None:
+ _details['preemptibleInstanceConfig'] = cli_util.parse_json_parameter("preemptible_instance_config", preemptible_instance_config)
+
+ if metadata is not None:
+ _details['metadata'] = cli_util.parse_json_parameter("metadata", metadata)
+
+ if agent_config is not None:
+ _details['agentConfig'] = cli_util.parse_json_parameter("agent_config", agent_config)
+
+ if shape is not None:
+ _details['shape'] = shape
+
+ if shape_config is not None:
+ _details['shapeConfig'] = cli_util.parse_json_parameter("shape_config", shape_config)
+
+ if subnet_id is not None:
+ _details['subnetId'] = subnet_id
+
+ if launch_volume_attachments is not None:
+ _details['launchVolumeAttachments'] = cli_util.parse_json_parameter("launch_volume_attachments", launch_volume_attachments)
+
+ if is_pv_encryption_in_transit_enabled is not None:
+ _details['isPvEncryptionInTransitEnabled'] = is_pv_encryption_in_transit_enabled
+
+ if platform_config is not None:
+ _details['platformConfig'] = cli_util.parse_json_parameter("platform_config", platform_config)
+
+ if placement_constraint_details is not None:
+ _details['placementConstraintDetails'] = cli_util.parse_json_parameter("placement_constraint_details", placement_constraint_details)
+
+ if is_ai_enterprise_enabled is not None:
+ _details['isAIEnterpriseEnabled'] = is_ai_enterprise_enabled
+
+ if instance_configuration_id is not None:
+ _details['instanceConfigurationId'] = instance_configuration_id
+
+ if licensing_configs is not None:
+ _details['licensingConfigs'] = cli_util.parse_json_parameter("licensing_configs", licensing_configs)
+
+ _details['sourceDetails']['sourceType'] = 'bootVolume'
+
+ client = cli_util.build_client('core', 'compute', ctx)
+ result = client.launch_instance(
+ launch_instance_details=_details,
+ **kwargs
+ )
+ if wait_for_state:
+
+ if hasattr(client, 'get_instance') and callable(getattr(client, 'get_instance')):
+ 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_instance(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)
+
+
+@instance_group.command(name=cli_util.override('compute.launch_instance_amd_rome_bm_gpu_launch_instance_platform_config.command_name', 'launch-instance-amd-rome-bm-gpu-launch-instance-platform-config'), help=u"""Creates a new instance in the specified compartment and the specified availability domain. For general information about instances, see [Overview of the Compute Service].
+
+For information about access control and compartments, see [Overview of the IAM Service].
+
+For information about availability domains, see [Regions and Availability Domains]. To get a list of availability domains, use the `ListAvailabilityDomains` operation in the Identity and Access Management Service API.
+
+All Oracle Cloud Infrastructure resources, including instances, get an Oracle-assigned, unique ID called an Oracle Cloud Identifier (OCID). When you create a resource, you can find its OCID in the response. You can also retrieve a resource's OCID by using a List API operation on that resource type, or by viewing the resource in the Console.
+
+To launch an instance using an image or a boot volume use the `sourceDetails` parameter in [LaunchInstanceDetails].
+
+When you launch an instance, it is automatically attached to a virtual network interface card (VNIC), called the *primary VNIC*. The VNIC has a private IP address from the subnet's CIDR. You can either assign a private IP address of your choice or let Oracle automatically assign one. You can choose whether the instance has a public IP address. To retrieve the addresses, use the [ListVnicAttachments] operation to get the VNIC ID for the instance, and then call [GetVnic] with the VNIC ID.
+
+You can later add secondary VNICs to an instance. For more information, see [Virtual Network Interface Cards (VNICs)].
+
+To launch an instance from a Marketplace image listing, you must provide the image ID of the listing resource version that you want, but you also must subscribe to the listing before you try to launch the instance. To subscribe to the listing, use the [GetAppCatalogListingAgreements] operation to get the signature for the terms of use agreement for the desired listing resource version. Then, call [CreateAppCatalogSubscription] with the signature. To get the image ID for the LaunchInstance operation, call [GetAppCatalogListingResourceVersion].
+
+When launching an instance, you may provide the `securityAttributes` parameter in [LaunchInstanceDetails] to manage security attributes via the instance, or in the embedded [CreateVnicDetails] to manage security attributes via the VNIC directly, but not both. Providing `securityAttributes` in both locations will return a 400 Bad Request response.
+
+To determine whether capacity is available for a specific shape before you create an instance, use the [CreateComputeCapacityReport] operation. \n[Command Reference](launchInstance)""")
+@cli_util.option('--availability-domain', required=True, help=u"""The availability domain of the instance.
+
+Example: `Uocm:PHX-AD-1`""")
+@cli_util.option('--compartment-id', required=True, help=u"""The OCID of the compartment.""")
+@cli_util.option('--capacity-reservation-id', help=u"""The OCID of the compute capacity reservation this instance is launched under. You can opt out of all default reservations by specifying an empty string as input for this field. For more information, see [Capacity Reservations].""")
+@cli_util.option('--create-vnic-details', type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
+@cli_util.option('--dedicated-vm-host-id', help=u"""The OCID of the dedicated virtual machine host to place the instance on.""")
+@cli_util.option('--defined-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags].
+
+Example: `{\"Operations\": {\"CostCenter\": \"42\"}}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
+@cli_util.option('--security-attributes', type=custom_types.CLI_COMPLEX_TYPE, help=u"""[Security attributes] are labels for a resource that can be referenced in a [Zero Trust Packet Routing] (ZPR) policy to control access to ZPR-supported resources.
+
+Example: `{\"Oracle-DataSecurity-ZPR\": {\"MaxEgressCount\": {\"value\":\"42\",\"mode\":\"audit\"}}}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
+@cli_util.option('--display-name', help=u"""A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.""")
+@cli_util.option('--extended-metadata', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Additional metadata key/value pairs that you provide. They serve the same purpose and functionality as fields in the `metadata` object.
+
+They are distinguished from `metadata` fields in that these can be nested JSON objects (whereas `metadata` fields are string/string maps only).
+
+The combined size of the `metadata` and `extendedMetadata` objects can be a maximum of 32,000 bytes.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
+@cli_util.option('--fault-domain', help=u"""A fault domain is a grouping of hardware and infrastructure within an availability domain. Each availability domain contains three fault domains. Fault domains let you distribute your instances so that they are not on the same physical hardware within a single availability domain. A hardware failure or Compute hardware maintenance that affects one fault domain does not affect instances in other fault domains.
+
+If you do not specify the fault domain, the system selects one for you.
+
+ To get a list of fault domains, use the [ListFaultDomains] operation in the Identity and Access Management Service API.
+
+Example: `FAULT-DOMAIN-1`""")
+@cli_util.option('--cluster-placement-group-id', help=u"""The OCID of the cluster placement group of the instance.""")
+@cli_util.option('--freeform-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags].
+
+Example: `{\"Department\": \"Finance\"}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
+@cli_util.option('--compute-cluster-id', help=u"""The [OCID] of the [compute cluster] that the instance will be created in.""")
+@cli_util.option('--hostname-label', help=u"""Deprecated. Instead use `hostnameLabel` in [CreateVnicDetails]. If you provide both, the values must match.""")
+@cli_util.option('--image-id', help=u"""Deprecated. Use `sourceDetails` with [InstanceSourceViaImageDetails] source type instead. If you specify values for both, the values must match.""")
+@cli_util.option('--ipxe-script-file', type=click.File(mode='r'), help=u"""This is an advanced option.
+
+When a bare metal or virtual machine instance boots, the iPXE firmware that runs on the instance is configured to run an iPXE script to continue the boot process.
+
+If you want more control over the boot process, you can provide your own custom iPXE script that will run when the instance boots. Be aware that the same iPXE script will run every time an instance boots, not only after the initial LaunchInstance call.
+
+The default iPXE script connects to the instance's local boot volume over iSCSI and performs a network boot. If you use a custom iPXE script and want to network-boot from the instance's local boot volume over iSCSI the same way as the default iPXE script, use the following iSCSI IP address: 169.254.0.2, and boot volume IQN: iqn.2015-02.oracle.boot.
+
+If your instance boot volume attachment type is paravirtualized, the boot volume is attached to the instance through virtio-scsi and no iPXE script is used. If your instance boot volume attachment type is paravirtualized and you use custom iPXE to network boot into your instance, the primary boot volume is attached as a data volume through virtio-scsi drive.
+
+For more information about the Bring Your Own Image feature of Oracle Cloud Infrastructure, see [Bring Your Own Image].
+
+For more information about iPXE, see http://ipxe.org.""")
+@cli_util.option('--launch-options', type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
+@cli_util.option('--instance-options', type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
+@cli_util.option('--availability-config', type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
+@cli_util.option('--preemptible-instance-config', type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
+@cli_util.option('--metadata', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Custom metadata key/value pairs that you provide, such as the SSH public key required to connect to the instance.
+
+A metadata service runs on every launched instance. The service is an HTTP endpoint listening on 169.254.169.254. You can use the service to:
+
+* Provide information to [Cloud-Init] to be used for various system initialization tasks.
+
+* Get information about the instance, including the custom metadata that you provide when you launch the instance.
+
+ **Providing Cloud-Init Metadata**
+
+ You can use the following metadata key names to provide information to Cloud-Init:
+
+ **\"ssh_authorized_keys\"** - Provide one or more public SSH keys to be included in the `~/.ssh/authorized_keys` file for the default user on the instance. Use a newline character to separate multiple keys. The SSH keys must be in the format necessary for the `authorized_keys` file, as shown in the example below.
+
+ **\"user_data\"** - Provide your own base64-encoded data to be used by Cloud-Init to run custom scripts or provide custom Cloud-Init configuration. For information about how to take advantage of user data, see the [Cloud-Init Documentation].
+
+ **Metadata Example**
+
+ \"metadata\" : { \"quake_bot_level\" : \"Severe\", \"ssh_authorized_keys\" : \"ssh-rsa == rsa-key-20160227\", \"user_data\" : \"==\" } **Getting Metadata on the Instance**
+
+ To get information about your instance, connect to the instance using SSH and issue any of the following GET requests:
+
+ curl -H \"Authorization: Bearer Oracle\" http://169.254.169.254/opc/v2/instance/ curl -H \"Authorization: Bearer Oracle\" http://169.254.169.254/opc/v2/instance/metadata/ curl -H \"Authorization: Bearer Oracle\" http://169.254.169.254/opc/v2/instance/metadata/
+
+ You'll get back a response that includes all the instance information; only the metadata information; or the metadata information for the specified key name, respectively.
+
+ The combined size of the `metadata` and `extendedMetadata` objects can be a maximum of 32,000 bytes.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
+@cli_util.option('--agent-config', type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
+@cli_util.option('--shape', help=u"""The shape of an instance. The shape determines the number of CPUs, amount of memory, and other resources allocated to the instance.
+
+You can enumerate all available shapes by calling [ListShapes].""")
+@cli_util.option('--shape-config', type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
+@cli_util.option('--source-details', type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
+@cli_util.option('--subnet-id', help=u"""Deprecated. Instead use `subnetId` in [CreateVnicDetails]. At least one of them is required; if you provide both, the values must match.""")
+@cli_util.option('--launch-volume-attachments', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Volume attachments to create as part of the launch instance operation.
+
+This option is a JSON list with items of type LaunchAttachVolumeDetails. For documentation on LaunchAttachVolumeDetails please see our API reference: https://docs.oracle.com/en-us/iaas/api/#/en/iaas/20160918/datatypes/LaunchAttachVolumeDetails.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
+@cli_util.option('--is-pv-encryption-in-transit-enabled', type=click.BOOL, help=u"""Whether to enable in-transit encryption for the data volume's paravirtualized attachment. This field applies to both block volumes and boot volumes. The default value is false.""")
+@cli_util.option('--placement-constraint-details', type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
+@cli_util.option('--is-ai-enterprise-enabled', type=click.BOOL, help=u"""Whether to enable AI enterprise on the instance.""")
+@cli_util.option('--instance-configuration-id', help=u"""The OCID of the Instance Configuration containing instance launch details. Any other fields supplied in this instance launch request will override the details stored in the Instance Configuration for this instance launch.""")
+@cli_util.option('--licensing-configs', type=custom_types.CLI_COMPLEX_TYPE, help=u"""List of licensing configurations associated with target launch values.
+
+This option is a JSON list with items of type LaunchInstanceLicensingConfig. For documentation on LaunchInstanceLicensingConfig please see our API reference: https://docs.oracle.com/en-us/iaas/api/#/en/iaas/20160918/datatypes/LaunchInstanceLicensingConfig.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
+@cli_util.option('--platform-config-is-secure-boot-enabled', type=click.BOOL, help=u"""Whether Secure Boot is enabled on the instance.""")
+@cli_util.option('--platform-config-is-trusted-platform-module-enabled', type=click.BOOL, help=u"""Whether the Trusted Platform Module (TPM) is enabled on the instance.""")
+@cli_util.option('--platform-config-is-measured-boot-enabled', type=click.BOOL, help=u"""Whether the Measured Boot feature is enabled on the instance.""")
+@cli_util.option('--platform-config-is-memory-encryption-enabled', type=click.BOOL, help=u"""Whether the instance is a confidential instance. If this value is `true`, the instance is a confidential instance. The default value is `false`.""")
+@cli_util.option('--platform-config-numa-nodes-per-socket', type=custom_types.CliCaseInsensitiveChoice(["NPS0", "NPS1", "NPS2", "NPS4", "NPS6"]), help=u"""The number of NUMA nodes per socket (NPS).""")
+@cli_util.option('--platform-config-is-symmetric-multi-threading-enabled', type=click.BOOL, help=u"""Whether symmetric multithreading is enabled on the instance. Symmetric multithreading is also called simultaneous multithreading (SMT) or Intel Hyper-Threading.
+
+Intel and AMD processors have two hardware execution threads per core (OCPU). SMT permits multiple independent threads of execution, to better use the resources and increase the efficiency of the CPU. When multithreading is disabled, only one thread is permitted to run on each core, which can provide higher or more predictable performance for some workloads.""")
+@cli_util.option('--platform-config-is-access-control-service-enabled', type=click.BOOL, help=u"""Whether the Access Control Service is enabled on the instance. When enabled, the platform can enforce PCIe device isolation, required for VFIO device pass-through.""")
+@cli_util.option('--platform-config-are-virtual-instructions-enabled', type=click.BOOL, help=u"""Whether virtualization instructions are available. For example, Secure Virtual Machine for AMD shapes or VT-x for Intel shapes.""")
+@cli_util.option('--platform-config-is-input-output-memory-management-unit-enabled', type=click.BOOL, help=u"""Whether the input-output memory management unit is enabled.""")
+@cli_util.option('--platform-config-config-map', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Instance Platform Configuration Configuration Map for flexible setting input.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["MOVING", "PROVISIONING", "RUNNING", "STARTING", "STOPPING", "STOPPED", "CREATING_IMAGE", "TERMINATING", "TERMINATED"]), 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 MOVING --wait-for-state TERMINATED 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({'create-vnic-details': {'module': 'core', 'class': 'CreateVnicDetails'}, 'defined-tags': {'module': 'core', 'class': 'dict(str, dict(str, object))'}, 'security-attributes': {'module': 'core', 'class': 'dict(str, dict(str, object))'}, 'extended-metadata': {'module': 'core', 'class': 'dict(str, object)'}, 'freeform-tags': {'module': 'core', 'class': 'dict(str, string)'}, 'launch-options': {'module': 'core', 'class': 'LaunchOptions'}, 'instance-options': {'module': 'core', 'class': 'InstanceOptions'}, 'availability-config': {'module': 'core', 'class': 'LaunchInstanceAvailabilityConfigDetails'}, 'preemptible-instance-config': {'module': 'core', 'class': 'PreemptibleInstanceConfigDetails'}, 'metadata': {'module': 'core', 'class': 'dict(str, string)'}, 'agent-config': {'module': 'core', 'class': 'LaunchInstanceAgentConfigDetails'}, 'shape-config': {'module': 'core', 'class': 'LaunchInstanceShapeConfigDetails'}, 'launch-volume-attachments': {'module': 'core', 'class': 'list[LaunchAttachVolumeDetails]'}, 'platform-config': {'module': 'core', 'class': 'LaunchInstancePlatformConfig'}, 'placement-constraint-details': {'module': 'core', 'class': 'PlacementConstraintDetails'}, 'licensing-configs': {'module': 'core', 'class': 'list[LaunchInstanceLicensingConfig]'}})
+@json_skeleton_utils.get_cli_json_input_option({'create-vnic-details': {'module': 'core', 'class': 'CreateVnicDetails'}, 'defined-tags': {'module': 'core', 'class': 'dict(str, dict(str, object))'}, 'security-attributes': {'module': 'core', 'class': 'dict(str, dict(str, object))'}, 'extended-metadata': {'module': 'core', 'class': 'dict(str, object)'}, 'freeform-tags': {'module': 'core', 'class': 'dict(str, string)'}, 'launch-options': {'module': 'core', 'class': 'LaunchOptions'}, 'instance-options': {'module': 'core', 'class': 'InstanceOptions'}, 'availability-config': {'module': 'core', 'class': 'LaunchInstanceAvailabilityConfigDetails'}, 'preemptible-instance-config': {'module': 'core', 'class': 'PreemptibleInstanceConfigDetails'}, 'metadata': {'module': 'core', 'class': 'dict(str, string)'}, 'agent-config': {'module': 'core', 'class': 'LaunchInstanceAgentConfigDetails'}, 'shape-config': {'module': 'core', 'class': 'LaunchInstanceShapeConfigDetails'}, 'source-details': {'module': 'core', 'class': 'InstanceSourceDetails'}, 'launch-volume-attachments': {'module': 'core', 'class': 'list[LaunchAttachVolumeDetails]'}, 'placement-constraint-details': {'module': 'core', 'class': 'PlacementConstraintDetails'}, 'licensing-configs': {'module': 'core', 'class': 'list[LaunchInstanceLicensingConfig]'}, 'platform-config-config-map': {'module': 'core', 'class': 'dict(str, string)'}})
@cli_util.help_option
@click.pass_context
-@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'create-vnic-details': {'module': 'core', 'class': 'CreateVnicDetails'}, 'defined-tags': {'module': 'core', 'class': 'dict(str, dict(str, object))'}, 'security-attributes': {'module': 'core', 'class': 'dict(str, dict(str, object))'}, 'extended-metadata': {'module': 'core', 'class': 'dict(str, object)'}, 'freeform-tags': {'module': 'core', 'class': 'dict(str, string)'}, 'launch-options': {'module': 'core', 'class': 'LaunchOptions'}, 'instance-options': {'module': 'core', 'class': 'InstanceOptions'}, 'availability-config': {'module': 'core', 'class': 'LaunchInstanceAvailabilityConfigDetails'}, 'preemptible-instance-config': {'module': 'core', 'class': 'PreemptibleInstanceConfigDetails'}, 'metadata': {'module': 'core', 'class': 'dict(str, string)'}, 'agent-config': {'module': 'core', 'class': 'LaunchInstanceAgentConfigDetails'}, 'shape-config': {'module': 'core', 'class': 'LaunchInstanceShapeConfigDetails'}, 'launch-volume-attachments': {'module': 'core', 'class': 'list[LaunchAttachVolumeDetails]'}, 'platform-config': {'module': 'core', 'class': 'LaunchInstancePlatformConfig'}, 'placement-constraint-details': {'module': 'core', 'class': 'PlacementConstraintDetails'}, 'licensing-configs': {'module': 'core', 'class': 'list[LaunchInstanceLicensingConfig]'}}, output_type={'module': 'core', 'class': 'Instance'})
+@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'create-vnic-details': {'module': 'core', 'class': 'CreateVnicDetails'}, 'defined-tags': {'module': 'core', 'class': 'dict(str, dict(str, object))'}, 'security-attributes': {'module': 'core', 'class': 'dict(str, dict(str, object))'}, 'extended-metadata': {'module': 'core', 'class': 'dict(str, object)'}, 'freeform-tags': {'module': 'core', 'class': 'dict(str, string)'}, 'launch-options': {'module': 'core', 'class': 'LaunchOptions'}, 'instance-options': {'module': 'core', 'class': 'InstanceOptions'}, 'availability-config': {'module': 'core', 'class': 'LaunchInstanceAvailabilityConfigDetails'}, 'preemptible-instance-config': {'module': 'core', 'class': 'PreemptibleInstanceConfigDetails'}, 'metadata': {'module': 'core', 'class': 'dict(str, string)'}, 'agent-config': {'module': 'core', 'class': 'LaunchInstanceAgentConfigDetails'}, 'shape-config': {'module': 'core', 'class': 'LaunchInstanceShapeConfigDetails'}, 'source-details': {'module': 'core', 'class': 'InstanceSourceDetails'}, 'launch-volume-attachments': {'module': 'core', 'class': 'list[LaunchAttachVolumeDetails]'}, 'placement-constraint-details': {'module': 'core', 'class': 'PlacementConstraintDetails'}, 'licensing-configs': {'module': 'core', 'class': 'list[LaunchInstanceLicensingConfig]'}, 'platform-config-config-map': {'module': 'core', 'class': 'dict(str, string)'}}, output_type={'module': 'core', 'class': 'Instance'})
@cli_util.wrap_exceptions
-def launch_instance_instance_source_via_boot_volume_details(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, availability_domain, compartment_id, source_details_boot_volume_id, capacity_reservation_id, create_vnic_details, dedicated_vm_host_id, defined_tags, security_attributes, display_name, extended_metadata, fault_domain, cluster_placement_group_id, freeform_tags, compute_cluster_id, hostname_label, image_id, ipxe_script_file, launch_options, instance_options, availability_config, preemptible_instance_config, metadata, agent_config, shape, shape_config, subnet_id, launch_volume_attachments, is_pv_encryption_in_transit_enabled, platform_config, placement_constraint_details, is_ai_enterprise_enabled, instance_configuration_id, licensing_configs):
+def launch_instance_amd_rome_bm_gpu_launch_instance_platform_config(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, availability_domain, compartment_id, capacity_reservation_id, create_vnic_details, dedicated_vm_host_id, defined_tags, security_attributes, display_name, extended_metadata, fault_domain, cluster_placement_group_id, freeform_tags, compute_cluster_id, hostname_label, image_id, ipxe_script_file, launch_options, instance_options, availability_config, preemptible_instance_config, metadata, agent_config, shape, shape_config, source_details, subnet_id, launch_volume_attachments, is_pv_encryption_in_transit_enabled, placement_constraint_details, is_ai_enterprise_enabled, instance_configuration_id, licensing_configs, platform_config_is_secure_boot_enabled, platform_config_is_trusted_platform_module_enabled, platform_config_is_measured_boot_enabled, platform_config_is_memory_encryption_enabled, platform_config_numa_nodes_per_socket, platform_config_is_symmetric_multi_threading_enabled, platform_config_is_access_control_service_enabled, platform_config_are_virtual_instructions_enabled, platform_config_is_input_output_memory_management_unit_enabled, platform_config_config_map):
kwargs = {}
_details = {}
- _details['sourceDetails'] = {}
+ _details['platformConfig'] = {}
_details['availabilityDomain'] = availability_domain
_details['compartmentId'] = compartment_id
- _details['sourceDetails']['bootVolumeId'] = source_details_boot_volume_id
if capacity_reservation_id is not None:
_details['capacityReservationId'] = capacity_reservation_id
@@ -5769,6 +6416,9 @@ def launch_instance_instance_source_via_boot_volume_details(ctx, from_json, wait
if shape_config is not None:
_details['shapeConfig'] = cli_util.parse_json_parameter("shape_config", shape_config)
+ if source_details is not None:
+ _details['sourceDetails'] = cli_util.parse_json_parameter("source_details", source_details)
+
if subnet_id is not None:
_details['subnetId'] = subnet_id
@@ -5778,9 +6428,6 @@ def launch_instance_instance_source_via_boot_volume_details(ctx, from_json, wait
if is_pv_encryption_in_transit_enabled is not None:
_details['isPvEncryptionInTransitEnabled'] = is_pv_encryption_in_transit_enabled
- if platform_config is not None:
- _details['platformConfig'] = cli_util.parse_json_parameter("platform_config", platform_config)
-
if placement_constraint_details is not None:
_details['placementConstraintDetails'] = cli_util.parse_json_parameter("placement_constraint_details", placement_constraint_details)
@@ -5793,7 +6440,37 @@ def launch_instance_instance_source_via_boot_volume_details(ctx, from_json, wait
if licensing_configs is not None:
_details['licensingConfigs'] = cli_util.parse_json_parameter("licensing_configs", licensing_configs)
- _details['sourceDetails']['sourceType'] = 'bootVolume'
+ if platform_config_is_secure_boot_enabled is not None:
+ _details['platformConfig']['isSecureBootEnabled'] = platform_config_is_secure_boot_enabled
+
+ if platform_config_is_trusted_platform_module_enabled is not None:
+ _details['platformConfig']['isTrustedPlatformModuleEnabled'] = platform_config_is_trusted_platform_module_enabled
+
+ if platform_config_is_measured_boot_enabled is not None:
+ _details['platformConfig']['isMeasuredBootEnabled'] = platform_config_is_measured_boot_enabled
+
+ if platform_config_is_memory_encryption_enabled is not None:
+ _details['platformConfig']['isMemoryEncryptionEnabled'] = platform_config_is_memory_encryption_enabled
+
+ if platform_config_numa_nodes_per_socket is not None:
+ _details['platformConfig']['numaNodesPerSocket'] = platform_config_numa_nodes_per_socket
+
+ if platform_config_is_symmetric_multi_threading_enabled is not None:
+ _details['platformConfig']['isSymmetricMultiThreadingEnabled'] = platform_config_is_symmetric_multi_threading_enabled
+
+ if platform_config_is_access_control_service_enabled is not None:
+ _details['platformConfig']['isAccessControlServiceEnabled'] = platform_config_is_access_control_service_enabled
+
+ if platform_config_are_virtual_instructions_enabled is not None:
+ _details['platformConfig']['areVirtualInstructionsEnabled'] = platform_config_are_virtual_instructions_enabled
+
+ if platform_config_is_input_output_memory_management_unit_enabled is not None:
+ _details['platformConfig']['isInputOutputMemoryManagementUnitEnabled'] = platform_config_is_input_output_memory_management_unit_enabled
+
+ if platform_config_config_map is not None:
+ _details['platformConfig']['configMap'] = cli_util.parse_json_parameter("platform_config_config_map", platform_config_config_map)
+
+ _details['platformConfig']['type'] = 'AMD_ROME_BM_GPU'
client = cli_util.build_client('core', 'compute', ctx)
result = client.launch_instance(
@@ -5826,7 +6503,7 @@ def launch_instance_instance_source_via_boot_volume_details(ctx, from_json, wait
cli_util.render_response(result, ctx)
-@instance_group.command(name=cli_util.override('compute.launch_instance_amd_rome_bm_gpu_launch_instance_platform_config.command_name', 'launch-instance-amd-rome-bm-gpu-launch-instance-platform-config'), help=u"""Creates a new instance in the specified compartment and the specified availability domain. For general information about instances, see [Overview of the Compute Service].
+@instance_group.command(name=cli_util.override('compute.launch_instance_amd_rome_bm_launch_instance_platform_config.command_name', 'launch-instance-amd-rome-bm-launch-instance-platform-config'), help=u"""Creates a new instance in the specified compartment and the specified availability domain. For general information about instances, see [Overview of the Compute Service].
For information about access control and compartments, see [Overview of the IAM Service].
@@ -5950,6 +6627,9 @@ def launch_instance_instance_source_via_boot_volume_details(ctx, from_json, wait
@cli_util.option('--platform-config-is-access-control-service-enabled', type=click.BOOL, help=u"""Whether the Access Control Service is enabled on the instance. When enabled, the platform can enforce PCIe device isolation, required for VFIO device pass-through.""")
@cli_util.option('--platform-config-are-virtual-instructions-enabled', type=click.BOOL, help=u"""Whether virtualization instructions are available. For example, Secure Virtual Machine for AMD shapes or VT-x for Intel shapes.""")
@cli_util.option('--platform-config-is-input-output-memory-management-unit-enabled', type=click.BOOL, help=u"""Whether the input-output memory management unit is enabled.""")
+@cli_util.option('--platform-config-percentage-of-cores-enabled', type=click.INT, help=u"""The percentage of cores enabled. Value must be a multiple of 25%. If the requested percentage results in a fractional number of cores, the system rounds up the number of cores across processors and provisions an instance with a whole number of cores.
+
+If the applications that you run on the instance use a core-based licensing model and need fewer cores than the full size of the shape, you can disable cores to reduce your licensing costs. The instance itself is billed for the full shape, regardless of whether all cores are enabled.""")
@cli_util.option('--platform-config-config-map', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Instance Platform Configuration Configuration Map for flexible setting input.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["MOVING", "PROVISIONING", "RUNNING", "STARTING", "STOPPING", "STOPPED", "CREATING_IMAGE", "TERMINATING", "TERMINATED"]), 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 MOVING --wait-for-state TERMINATED 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.""")
@@ -5959,7 +6639,7 @@ def launch_instance_instance_source_via_boot_volume_details(ctx, from_json, wait
@click.pass_context
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'create-vnic-details': {'module': 'core', 'class': 'CreateVnicDetails'}, 'defined-tags': {'module': 'core', 'class': 'dict(str, dict(str, object))'}, 'security-attributes': {'module': 'core', 'class': 'dict(str, dict(str, object))'}, 'extended-metadata': {'module': 'core', 'class': 'dict(str, object)'}, 'freeform-tags': {'module': 'core', 'class': 'dict(str, string)'}, 'launch-options': {'module': 'core', 'class': 'LaunchOptions'}, 'instance-options': {'module': 'core', 'class': 'InstanceOptions'}, 'availability-config': {'module': 'core', 'class': 'LaunchInstanceAvailabilityConfigDetails'}, 'preemptible-instance-config': {'module': 'core', 'class': 'PreemptibleInstanceConfigDetails'}, 'metadata': {'module': 'core', 'class': 'dict(str, string)'}, 'agent-config': {'module': 'core', 'class': 'LaunchInstanceAgentConfigDetails'}, 'shape-config': {'module': 'core', 'class': 'LaunchInstanceShapeConfigDetails'}, 'source-details': {'module': 'core', 'class': 'InstanceSourceDetails'}, 'launch-volume-attachments': {'module': 'core', 'class': 'list[LaunchAttachVolumeDetails]'}, 'placement-constraint-details': {'module': 'core', 'class': 'PlacementConstraintDetails'}, 'licensing-configs': {'module': 'core', 'class': 'list[LaunchInstanceLicensingConfig]'}, 'platform-config-config-map': {'module': 'core', 'class': 'dict(str, string)'}}, output_type={'module': 'core', 'class': 'Instance'})
@cli_util.wrap_exceptions
-def launch_instance_amd_rome_bm_gpu_launch_instance_platform_config(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, availability_domain, compartment_id, capacity_reservation_id, create_vnic_details, dedicated_vm_host_id, defined_tags, security_attributes, display_name, extended_metadata, fault_domain, cluster_placement_group_id, freeform_tags, compute_cluster_id, hostname_label, image_id, ipxe_script_file, launch_options, instance_options, availability_config, preemptible_instance_config, metadata, agent_config, shape, shape_config, source_details, subnet_id, launch_volume_attachments, is_pv_encryption_in_transit_enabled, placement_constraint_details, is_ai_enterprise_enabled, instance_configuration_id, licensing_configs, platform_config_is_secure_boot_enabled, platform_config_is_trusted_platform_module_enabled, platform_config_is_measured_boot_enabled, platform_config_is_memory_encryption_enabled, platform_config_numa_nodes_per_socket, platform_config_is_symmetric_multi_threading_enabled, platform_config_is_access_control_service_enabled, platform_config_are_virtual_instructions_enabled, platform_config_is_input_output_memory_management_unit_enabled, platform_config_config_map):
+def launch_instance_amd_rome_bm_launch_instance_platform_config(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, availability_domain, compartment_id, capacity_reservation_id, create_vnic_details, dedicated_vm_host_id, defined_tags, security_attributes, display_name, extended_metadata, fault_domain, cluster_placement_group_id, freeform_tags, compute_cluster_id, hostname_label, image_id, ipxe_script_file, launch_options, instance_options, availability_config, preemptible_instance_config, metadata, agent_config, shape, shape_config, source_details, subnet_id, launch_volume_attachments, is_pv_encryption_in_transit_enabled, placement_constraint_details, is_ai_enterprise_enabled, instance_configuration_id, licensing_configs, platform_config_is_secure_boot_enabled, platform_config_is_trusted_platform_module_enabled, platform_config_is_measured_boot_enabled, platform_config_is_memory_encryption_enabled, platform_config_numa_nodes_per_socket, platform_config_is_symmetric_multi_threading_enabled, platform_config_is_access_control_service_enabled, platform_config_are_virtual_instructions_enabled, platform_config_is_input_output_memory_management_unit_enabled, platform_config_percentage_of_cores_enabled, platform_config_config_map):
kwargs = {}
@@ -6085,10 +6765,13 @@ def launch_instance_amd_rome_bm_gpu_launch_instance_platform_config(ctx, from_js
if platform_config_is_input_output_memory_management_unit_enabled is not None:
_details['platformConfig']['isInputOutputMemoryManagementUnitEnabled'] = platform_config_is_input_output_memory_management_unit_enabled
+ if platform_config_percentage_of_cores_enabled is not None:
+ _details['platformConfig']['percentageOfCoresEnabled'] = platform_config_percentage_of_cores_enabled
+
if platform_config_config_map is not None:
_details['platformConfig']['configMap'] = cli_util.parse_json_parameter("platform_config_config_map", platform_config_config_map)
- _details['platformConfig']['type'] = 'AMD_ROME_BM_GPU'
+ _details['platformConfig']['type'] = 'AMD_ROME_BM'
client = cli_util.build_client('core', 'compute', ctx)
result = client.launch_instance(
@@ -6121,7 +6804,7 @@ def launch_instance_amd_rome_bm_gpu_launch_instance_platform_config(ctx, from_js
cli_util.render_response(result, ctx)
-@instance_group.command(name=cli_util.override('compute.launch_instance_amd_rome_bm_launch_instance_platform_config.command_name', 'launch-instance-amd-rome-bm-launch-instance-platform-config'), help=u"""Creates a new instance in the specified compartment and the specified availability domain. For general information about instances, see [Overview of the Compute Service].
+@instance_group.command(name=cli_util.override('compute.launch_instance_intel_icelake_bm_launch_instance_platform_config.command_name', 'launch-instance-intel-icelake-bm-launch-instance-platform-config'), help=u"""Creates a new instance in the specified compartment and the specified availability domain. For general information about instances, see [Overview of the Compute Service].
For information about access control and compartments, see [Overview of the IAM Service].
@@ -6238,12 +6921,10 @@ def launch_instance_amd_rome_bm_gpu_launch_instance_platform_config(ctx, from_js
@cli_util.option('--platform-config-is-trusted-platform-module-enabled', type=click.BOOL, help=u"""Whether the Trusted Platform Module (TPM) is enabled on the instance.""")
@cli_util.option('--platform-config-is-measured-boot-enabled', type=click.BOOL, help=u"""Whether the Measured Boot feature is enabled on the instance.""")
@cli_util.option('--platform-config-is-memory-encryption-enabled', type=click.BOOL, help=u"""Whether the instance is a confidential instance. If this value is `true`, the instance is a confidential instance. The default value is `false`.""")
-@cli_util.option('--platform-config-numa-nodes-per-socket', type=custom_types.CliCaseInsensitiveChoice(["NPS0", "NPS1", "NPS2", "NPS4", "NPS6"]), help=u"""The number of NUMA nodes per socket (NPS).""")
+@cli_util.option('--platform-config-numa-nodes-per-socket', type=custom_types.CliCaseInsensitiveChoice(["NPS1", "NPS2"]), help=u"""The number of NUMA nodes per socket (NPS).""")
@cli_util.option('--platform-config-is-symmetric-multi-threading-enabled', type=click.BOOL, help=u"""Whether symmetric multithreading is enabled on the instance. Symmetric multithreading is also called simultaneous multithreading (SMT) or Intel Hyper-Threading.
Intel and AMD processors have two hardware execution threads per core (OCPU). SMT permits multiple independent threads of execution, to better use the resources and increase the efficiency of the CPU. When multithreading is disabled, only one thread is permitted to run on each core, which can provide higher or more predictable performance for some workloads.""")
-@cli_util.option('--platform-config-is-access-control-service-enabled', type=click.BOOL, help=u"""Whether the Access Control Service is enabled on the instance. When enabled, the platform can enforce PCIe device isolation, required for VFIO device pass-through.""")
-@cli_util.option('--platform-config-are-virtual-instructions-enabled', type=click.BOOL, help=u"""Whether virtualization instructions are available. For example, Secure Virtual Machine for AMD shapes or VT-x for Intel shapes.""")
@cli_util.option('--platform-config-is-input-output-memory-management-unit-enabled', type=click.BOOL, help=u"""Whether the input-output memory management unit is enabled.""")
@cli_util.option('--platform-config-percentage-of-cores-enabled', type=click.INT, help=u"""The percentage of cores enabled. Value must be a multiple of 25%. If the requested percentage results in a fractional number of cores, the system rounds up the number of cores across processors and provisions an instance with a whole number of cores.
@@ -6257,7 +6938,7 @@ def launch_instance_amd_rome_bm_gpu_launch_instance_platform_config(ctx, from_js
@click.pass_context
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'create-vnic-details': {'module': 'core', 'class': 'CreateVnicDetails'}, 'defined-tags': {'module': 'core', 'class': 'dict(str, dict(str, object))'}, 'security-attributes': {'module': 'core', 'class': 'dict(str, dict(str, object))'}, 'extended-metadata': {'module': 'core', 'class': 'dict(str, object)'}, 'freeform-tags': {'module': 'core', 'class': 'dict(str, string)'}, 'launch-options': {'module': 'core', 'class': 'LaunchOptions'}, 'instance-options': {'module': 'core', 'class': 'InstanceOptions'}, 'availability-config': {'module': 'core', 'class': 'LaunchInstanceAvailabilityConfigDetails'}, 'preemptible-instance-config': {'module': 'core', 'class': 'PreemptibleInstanceConfigDetails'}, 'metadata': {'module': 'core', 'class': 'dict(str, string)'}, 'agent-config': {'module': 'core', 'class': 'LaunchInstanceAgentConfigDetails'}, 'shape-config': {'module': 'core', 'class': 'LaunchInstanceShapeConfigDetails'}, 'source-details': {'module': 'core', 'class': 'InstanceSourceDetails'}, 'launch-volume-attachments': {'module': 'core', 'class': 'list[LaunchAttachVolumeDetails]'}, 'placement-constraint-details': {'module': 'core', 'class': 'PlacementConstraintDetails'}, 'licensing-configs': {'module': 'core', 'class': 'list[LaunchInstanceLicensingConfig]'}, 'platform-config-config-map': {'module': 'core', 'class': 'dict(str, string)'}}, output_type={'module': 'core', 'class': 'Instance'})
@cli_util.wrap_exceptions
-def launch_instance_amd_rome_bm_launch_instance_platform_config(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, availability_domain, compartment_id, capacity_reservation_id, create_vnic_details, dedicated_vm_host_id, defined_tags, security_attributes, display_name, extended_metadata, fault_domain, cluster_placement_group_id, freeform_tags, compute_cluster_id, hostname_label, image_id, ipxe_script_file, launch_options, instance_options, availability_config, preemptible_instance_config, metadata, agent_config, shape, shape_config, source_details, subnet_id, launch_volume_attachments, is_pv_encryption_in_transit_enabled, placement_constraint_details, is_ai_enterprise_enabled, instance_configuration_id, licensing_configs, platform_config_is_secure_boot_enabled, platform_config_is_trusted_platform_module_enabled, platform_config_is_measured_boot_enabled, platform_config_is_memory_encryption_enabled, platform_config_numa_nodes_per_socket, platform_config_is_symmetric_multi_threading_enabled, platform_config_is_access_control_service_enabled, platform_config_are_virtual_instructions_enabled, platform_config_is_input_output_memory_management_unit_enabled, platform_config_percentage_of_cores_enabled, platform_config_config_map):
+def launch_instance_intel_icelake_bm_launch_instance_platform_config(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, availability_domain, compartment_id, capacity_reservation_id, create_vnic_details, dedicated_vm_host_id, defined_tags, security_attributes, display_name, extended_metadata, fault_domain, cluster_placement_group_id, freeform_tags, compute_cluster_id, hostname_label, image_id, ipxe_script_file, launch_options, instance_options, availability_config, preemptible_instance_config, metadata, agent_config, shape, shape_config, source_details, subnet_id, launch_volume_attachments, is_pv_encryption_in_transit_enabled, placement_constraint_details, is_ai_enterprise_enabled, instance_configuration_id, licensing_configs, platform_config_is_secure_boot_enabled, platform_config_is_trusted_platform_module_enabled, platform_config_is_measured_boot_enabled, platform_config_is_memory_encryption_enabled, platform_config_numa_nodes_per_socket, platform_config_is_symmetric_multi_threading_enabled, platform_config_is_input_output_memory_management_unit_enabled, platform_config_percentage_of_cores_enabled, platform_config_config_map):
kwargs = {}
@@ -6374,12 +7055,6 @@ def launch_instance_amd_rome_bm_launch_instance_platform_config(ctx, from_json,
if platform_config_is_symmetric_multi_threading_enabled is not None:
_details['platformConfig']['isSymmetricMultiThreadingEnabled'] = platform_config_is_symmetric_multi_threading_enabled
- if platform_config_is_access_control_service_enabled is not None:
- _details['platformConfig']['isAccessControlServiceEnabled'] = platform_config_is_access_control_service_enabled
-
- if platform_config_are_virtual_instructions_enabled is not None:
- _details['platformConfig']['areVirtualInstructionsEnabled'] = platform_config_are_virtual_instructions_enabled
-
if platform_config_is_input_output_memory_management_unit_enabled is not None:
_details['platformConfig']['isInputOutputMemoryManagementUnitEnabled'] = platform_config_is_input_output_memory_management_unit_enabled
@@ -6389,7 +7064,7 @@ def launch_instance_amd_rome_bm_launch_instance_platform_config(ctx, from_json,
if platform_config_config_map is not None:
_details['platformConfig']['configMap'] = cli_util.parse_json_parameter("platform_config_config_map", platform_config_config_map)
- _details['platformConfig']['type'] = 'AMD_ROME_BM'
+ _details['platformConfig']['type'] = 'INTEL_ICELAKE_BM'
client = cli_util.build_client('core', 'compute', ctx)
result = client.launch_instance(
@@ -6422,7 +7097,7 @@ def launch_instance_amd_rome_bm_launch_instance_platform_config(ctx, from_json,
cli_util.render_response(result, ctx)
-@instance_group.command(name=cli_util.override('compute.launch_instance_intel_icelake_bm_launch_instance_platform_config.command_name', 'launch-instance-intel-icelake-bm-launch-instance-platform-config'), help=u"""Creates a new instance in the specified compartment and the specified availability domain. For general information about instances, see [Overview of the Compute Service].
+@instance_group.command(name=cli_util.override('compute.launch_instance_amd_vm_launch_instance_platform_config.command_name', 'launch-instance-amd-vm-launch-instance-platform-config'), help=u"""Creates a new instance in the specified compartment and the specified availability domain. For general information about instances, see [Overview of the Compute Service].
For information about access control and compartments, see [Overview of the IAM Service].
@@ -6539,24 +7214,18 @@ def launch_instance_amd_rome_bm_launch_instance_platform_config(ctx, from_json,
@cli_util.option('--platform-config-is-trusted-platform-module-enabled', type=click.BOOL, help=u"""Whether the Trusted Platform Module (TPM) is enabled on the instance.""")
@cli_util.option('--platform-config-is-measured-boot-enabled', type=click.BOOL, help=u"""Whether the Measured Boot feature is enabled on the instance.""")
@cli_util.option('--platform-config-is-memory-encryption-enabled', type=click.BOOL, help=u"""Whether the instance is a confidential instance. If this value is `true`, the instance is a confidential instance. The default value is `false`.""")
-@cli_util.option('--platform-config-numa-nodes-per-socket', type=custom_types.CliCaseInsensitiveChoice(["NPS1", "NPS2"]), help=u"""The number of NUMA nodes per socket (NPS).""")
@cli_util.option('--platform-config-is-symmetric-multi-threading-enabled', type=click.BOOL, help=u"""Whether symmetric multithreading is enabled on the instance. Symmetric multithreading is also called simultaneous multithreading (SMT) or Intel Hyper-Threading.
Intel and AMD processors have two hardware execution threads per core (OCPU). SMT permits multiple independent threads of execution, to better use the resources and increase the efficiency of the CPU. When multithreading is disabled, only one thread is permitted to run on each core, which can provide higher or more predictable performance for some workloads.""")
-@cli_util.option('--platform-config-is-input-output-memory-management-unit-enabled', type=click.BOOL, help=u"""Whether the input-output memory management unit is enabled.""")
-@cli_util.option('--platform-config-percentage-of-cores-enabled', type=click.INT, help=u"""The percentage of cores enabled. Value must be a multiple of 25%. If the requested percentage results in a fractional number of cores, the system rounds up the number of cores across processors and provisions an instance with a whole number of cores.
-
-If the applications that you run on the instance use a core-based licensing model and need fewer cores than the full size of the shape, you can disable cores to reduce your licensing costs. The instance itself is billed for the full shape, regardless of whether all cores are enabled.""")
-@cli_util.option('--platform-config-config-map', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Instance Platform Configuration Configuration Map for flexible setting input.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["MOVING", "PROVISIONING", "RUNNING", "STARTING", "STOPPING", "STOPPED", "CREATING_IMAGE", "TERMINATING", "TERMINATED"]), 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 MOVING --wait-for-state TERMINATED 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({'create-vnic-details': {'module': 'core', 'class': 'CreateVnicDetails'}, 'defined-tags': {'module': 'core', 'class': 'dict(str, dict(str, object))'}, 'security-attributes': {'module': 'core', 'class': 'dict(str, dict(str, object))'}, 'extended-metadata': {'module': 'core', 'class': 'dict(str, object)'}, 'freeform-tags': {'module': 'core', 'class': 'dict(str, string)'}, 'launch-options': {'module': 'core', 'class': 'LaunchOptions'}, 'instance-options': {'module': 'core', 'class': 'InstanceOptions'}, 'availability-config': {'module': 'core', 'class': 'LaunchInstanceAvailabilityConfigDetails'}, 'preemptible-instance-config': {'module': 'core', 'class': 'PreemptibleInstanceConfigDetails'}, 'metadata': {'module': 'core', 'class': 'dict(str, string)'}, 'agent-config': {'module': 'core', 'class': 'LaunchInstanceAgentConfigDetails'}, 'shape-config': {'module': 'core', 'class': 'LaunchInstanceShapeConfigDetails'}, 'source-details': {'module': 'core', 'class': 'InstanceSourceDetails'}, 'launch-volume-attachments': {'module': 'core', 'class': 'list[LaunchAttachVolumeDetails]'}, 'placement-constraint-details': {'module': 'core', 'class': 'PlacementConstraintDetails'}, 'licensing-configs': {'module': 'core', 'class': 'list[LaunchInstanceLicensingConfig]'}, 'platform-config-config-map': {'module': 'core', 'class': 'dict(str, string)'}})
+@json_skeleton_utils.get_cli_json_input_option({'create-vnic-details': {'module': 'core', 'class': 'CreateVnicDetails'}, 'defined-tags': {'module': 'core', 'class': 'dict(str, dict(str, object))'}, 'security-attributes': {'module': 'core', 'class': 'dict(str, dict(str, object))'}, 'extended-metadata': {'module': 'core', 'class': 'dict(str, object)'}, 'freeform-tags': {'module': 'core', 'class': 'dict(str, string)'}, 'launch-options': {'module': 'core', 'class': 'LaunchOptions'}, 'instance-options': {'module': 'core', 'class': 'InstanceOptions'}, 'availability-config': {'module': 'core', 'class': 'LaunchInstanceAvailabilityConfigDetails'}, 'preemptible-instance-config': {'module': 'core', 'class': 'PreemptibleInstanceConfigDetails'}, 'metadata': {'module': 'core', 'class': 'dict(str, string)'}, 'agent-config': {'module': 'core', 'class': 'LaunchInstanceAgentConfigDetails'}, 'shape-config': {'module': 'core', 'class': 'LaunchInstanceShapeConfigDetails'}, 'source-details': {'module': 'core', 'class': 'InstanceSourceDetails'}, 'launch-volume-attachments': {'module': 'core', 'class': 'list[LaunchAttachVolumeDetails]'}, 'placement-constraint-details': {'module': 'core', 'class': 'PlacementConstraintDetails'}, 'licensing-configs': {'module': 'core', 'class': 'list[LaunchInstanceLicensingConfig]'}})
@cli_util.help_option
@click.pass_context
-@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'create-vnic-details': {'module': 'core', 'class': 'CreateVnicDetails'}, 'defined-tags': {'module': 'core', 'class': 'dict(str, dict(str, object))'}, 'security-attributes': {'module': 'core', 'class': 'dict(str, dict(str, object))'}, 'extended-metadata': {'module': 'core', 'class': 'dict(str, object)'}, 'freeform-tags': {'module': 'core', 'class': 'dict(str, string)'}, 'launch-options': {'module': 'core', 'class': 'LaunchOptions'}, 'instance-options': {'module': 'core', 'class': 'InstanceOptions'}, 'availability-config': {'module': 'core', 'class': 'LaunchInstanceAvailabilityConfigDetails'}, 'preemptible-instance-config': {'module': 'core', 'class': 'PreemptibleInstanceConfigDetails'}, 'metadata': {'module': 'core', 'class': 'dict(str, string)'}, 'agent-config': {'module': 'core', 'class': 'LaunchInstanceAgentConfigDetails'}, 'shape-config': {'module': 'core', 'class': 'LaunchInstanceShapeConfigDetails'}, 'source-details': {'module': 'core', 'class': 'InstanceSourceDetails'}, 'launch-volume-attachments': {'module': 'core', 'class': 'list[LaunchAttachVolumeDetails]'}, 'placement-constraint-details': {'module': 'core', 'class': 'PlacementConstraintDetails'}, 'licensing-configs': {'module': 'core', 'class': 'list[LaunchInstanceLicensingConfig]'}, 'platform-config-config-map': {'module': 'core', 'class': 'dict(str, string)'}}, output_type={'module': 'core', 'class': 'Instance'})
+@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'create-vnic-details': {'module': 'core', 'class': 'CreateVnicDetails'}, 'defined-tags': {'module': 'core', 'class': 'dict(str, dict(str, object))'}, 'security-attributes': {'module': 'core', 'class': 'dict(str, dict(str, object))'}, 'extended-metadata': {'module': 'core', 'class': 'dict(str, object)'}, 'freeform-tags': {'module': 'core', 'class': 'dict(str, string)'}, 'launch-options': {'module': 'core', 'class': 'LaunchOptions'}, 'instance-options': {'module': 'core', 'class': 'InstanceOptions'}, 'availability-config': {'module': 'core', 'class': 'LaunchInstanceAvailabilityConfigDetails'}, 'preemptible-instance-config': {'module': 'core', 'class': 'PreemptibleInstanceConfigDetails'}, 'metadata': {'module': 'core', 'class': 'dict(str, string)'}, 'agent-config': {'module': 'core', 'class': 'LaunchInstanceAgentConfigDetails'}, 'shape-config': {'module': 'core', 'class': 'LaunchInstanceShapeConfigDetails'}, 'source-details': {'module': 'core', 'class': 'InstanceSourceDetails'}, 'launch-volume-attachments': {'module': 'core', 'class': 'list[LaunchAttachVolumeDetails]'}, 'placement-constraint-details': {'module': 'core', 'class': 'PlacementConstraintDetails'}, 'licensing-configs': {'module': 'core', 'class': 'list[LaunchInstanceLicensingConfig]'}}, output_type={'module': 'core', 'class': 'Instance'})
@cli_util.wrap_exceptions
-def launch_instance_intel_icelake_bm_launch_instance_platform_config(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, availability_domain, compartment_id, capacity_reservation_id, create_vnic_details, dedicated_vm_host_id, defined_tags, security_attributes, display_name, extended_metadata, fault_domain, cluster_placement_group_id, freeform_tags, compute_cluster_id, hostname_label, image_id, ipxe_script_file, launch_options, instance_options, availability_config, preemptible_instance_config, metadata, agent_config, shape, shape_config, source_details, subnet_id, launch_volume_attachments, is_pv_encryption_in_transit_enabled, placement_constraint_details, is_ai_enterprise_enabled, instance_configuration_id, licensing_configs, platform_config_is_secure_boot_enabled, platform_config_is_trusted_platform_module_enabled, platform_config_is_measured_boot_enabled, platform_config_is_memory_encryption_enabled, platform_config_numa_nodes_per_socket, platform_config_is_symmetric_multi_threading_enabled, platform_config_is_input_output_memory_management_unit_enabled, platform_config_percentage_of_cores_enabled, platform_config_config_map):
+def launch_instance_amd_vm_launch_instance_platform_config(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, availability_domain, compartment_id, capacity_reservation_id, create_vnic_details, dedicated_vm_host_id, defined_tags, security_attributes, display_name, extended_metadata, fault_domain, cluster_placement_group_id, freeform_tags, compute_cluster_id, hostname_label, image_id, ipxe_script_file, launch_options, instance_options, availability_config, preemptible_instance_config, metadata, agent_config, shape, shape_config, source_details, subnet_id, launch_volume_attachments, is_pv_encryption_in_transit_enabled, placement_constraint_details, is_ai_enterprise_enabled, instance_configuration_id, licensing_configs, platform_config_is_secure_boot_enabled, platform_config_is_trusted_platform_module_enabled, platform_config_is_measured_boot_enabled, platform_config_is_memory_encryption_enabled, platform_config_is_symmetric_multi_threading_enabled):
kwargs = {}
@@ -6667,22 +7336,10 @@ def launch_instance_intel_icelake_bm_launch_instance_platform_config(ctx, from_j
if platform_config_is_memory_encryption_enabled is not None:
_details['platformConfig']['isMemoryEncryptionEnabled'] = platform_config_is_memory_encryption_enabled
- if platform_config_numa_nodes_per_socket is not None:
- _details['platformConfig']['numaNodesPerSocket'] = platform_config_numa_nodes_per_socket
-
if platform_config_is_symmetric_multi_threading_enabled is not None:
_details['platformConfig']['isSymmetricMultiThreadingEnabled'] = platform_config_is_symmetric_multi_threading_enabled
- if platform_config_is_input_output_memory_management_unit_enabled is not None:
- _details['platformConfig']['isInputOutputMemoryManagementUnitEnabled'] = platform_config_is_input_output_memory_management_unit_enabled
-
- if platform_config_percentage_of_cores_enabled is not None:
- _details['platformConfig']['percentageOfCoresEnabled'] = platform_config_percentage_of_cores_enabled
-
- if platform_config_config_map is not None:
- _details['platformConfig']['configMap'] = cli_util.parse_json_parameter("platform_config_config_map", platform_config_config_map)
-
- _details['platformConfig']['type'] = 'INTEL_ICELAKE_BM'
+ _details['platformConfig']['type'] = 'AMD_VM'
client = cli_util.build_client('core', 'compute', ctx)
result = client.launch_instance(
@@ -6715,7 +7372,7 @@ def launch_instance_intel_icelake_bm_launch_instance_platform_config(ctx, from_j
cli_util.render_response(result, ctx)
-@instance_group.command(name=cli_util.override('compute.launch_instance_amd_vm_launch_instance_platform_config.command_name', 'launch-instance-amd-vm-launch-instance-platform-config'), help=u"""Creates a new instance in the specified compartment and the specified availability domain. For general information about instances, see [Overview of the Compute Service].
+@instance_group.command(name=cli_util.override('compute.launch_instance_intel_vm_launch_instance_platform_config.command_name', 'launch-instance-intel-vm-launch-instance-platform-config'), help=u"""Creates a new instance in the specified compartment and the specified availability domain. For general information about instances, see [Overview of the Compute Service].
For information about access control and compartments, see [Overview of the IAM Service].
@@ -6843,7 +7500,7 @@ def launch_instance_intel_icelake_bm_launch_instance_platform_config(ctx, from_j
@click.pass_context
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'create-vnic-details': {'module': 'core', 'class': 'CreateVnicDetails'}, 'defined-tags': {'module': 'core', 'class': 'dict(str, dict(str, object))'}, 'security-attributes': {'module': 'core', 'class': 'dict(str, dict(str, object))'}, 'extended-metadata': {'module': 'core', 'class': 'dict(str, object)'}, 'freeform-tags': {'module': 'core', 'class': 'dict(str, string)'}, 'launch-options': {'module': 'core', 'class': 'LaunchOptions'}, 'instance-options': {'module': 'core', 'class': 'InstanceOptions'}, 'availability-config': {'module': 'core', 'class': 'LaunchInstanceAvailabilityConfigDetails'}, 'preemptible-instance-config': {'module': 'core', 'class': 'PreemptibleInstanceConfigDetails'}, 'metadata': {'module': 'core', 'class': 'dict(str, string)'}, 'agent-config': {'module': 'core', 'class': 'LaunchInstanceAgentConfigDetails'}, 'shape-config': {'module': 'core', 'class': 'LaunchInstanceShapeConfigDetails'}, 'source-details': {'module': 'core', 'class': 'InstanceSourceDetails'}, 'launch-volume-attachments': {'module': 'core', 'class': 'list[LaunchAttachVolumeDetails]'}, 'placement-constraint-details': {'module': 'core', 'class': 'PlacementConstraintDetails'}, 'licensing-configs': {'module': 'core', 'class': 'list[LaunchInstanceLicensingConfig]'}}, output_type={'module': 'core', 'class': 'Instance'})
@cli_util.wrap_exceptions
-def launch_instance_amd_vm_launch_instance_platform_config(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, availability_domain, compartment_id, capacity_reservation_id, create_vnic_details, dedicated_vm_host_id, defined_tags, security_attributes, display_name, extended_metadata, fault_domain, cluster_placement_group_id, freeform_tags, compute_cluster_id, hostname_label, image_id, ipxe_script_file, launch_options, instance_options, availability_config, preemptible_instance_config, metadata, agent_config, shape, shape_config, source_details, subnet_id, launch_volume_attachments, is_pv_encryption_in_transit_enabled, placement_constraint_details, is_ai_enterprise_enabled, instance_configuration_id, licensing_configs, platform_config_is_secure_boot_enabled, platform_config_is_trusted_platform_module_enabled, platform_config_is_measured_boot_enabled, platform_config_is_memory_encryption_enabled, platform_config_is_symmetric_multi_threading_enabled):
+def launch_instance_intel_vm_launch_instance_platform_config(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, availability_domain, compartment_id, capacity_reservation_id, create_vnic_details, dedicated_vm_host_id, defined_tags, security_attributes, display_name, extended_metadata, fault_domain, cluster_placement_group_id, freeform_tags, compute_cluster_id, hostname_label, image_id, ipxe_script_file, launch_options, instance_options, availability_config, preemptible_instance_config, metadata, agent_config, shape, shape_config, source_details, subnet_id, launch_volume_attachments, is_pv_encryption_in_transit_enabled, placement_constraint_details, is_ai_enterprise_enabled, instance_configuration_id, licensing_configs, platform_config_is_secure_boot_enabled, platform_config_is_trusted_platform_module_enabled, platform_config_is_measured_boot_enabled, platform_config_is_memory_encryption_enabled, platform_config_is_symmetric_multi_threading_enabled):
kwargs = {}
@@ -6957,7 +7614,7 @@ def launch_instance_amd_vm_launch_instance_platform_config(ctx, from_json, wait_
if platform_config_is_symmetric_multi_threading_enabled is not None:
_details['platformConfig']['isSymmetricMultiThreadingEnabled'] = platform_config_is_symmetric_multi_threading_enabled
- _details['platformConfig']['type'] = 'AMD_VM'
+ _details['platformConfig']['type'] = 'INTEL_VM'
client = cli_util.build_client('core', 'compute', ctx)
result = client.launch_instance(
@@ -6990,7 +7647,7 @@ def launch_instance_amd_vm_launch_instance_platform_config(ctx, from_json, wait_
cli_util.render_response(result, ctx)
-@instance_group.command(name=cli_util.override('compute.launch_instance_intel_vm_launch_instance_platform_config.command_name', 'launch-instance-intel-vm-launch-instance-platform-config'), help=u"""Creates a new instance in the specified compartment and the specified availability domain. For general information about instances, see [Overview of the Compute Service].
+@instance_group.command(name=cli_util.override('compute.launch_instance_intel_skylake_bm_launch_instance_platform_config.command_name', 'launch-instance-intel-skylake-bm-launch-instance-platform-config'), help=u"""Creates a new instance in the specified compartment and the specified availability domain. For general information about instances, see [Overview of the Compute Service].
For information about access control and compartments, see [Overview of the IAM Service].
@@ -7107,18 +7764,24 @@ def launch_instance_amd_vm_launch_instance_platform_config(ctx, from_json, wait_
@cli_util.option('--platform-config-is-trusted-platform-module-enabled', type=click.BOOL, help=u"""Whether the Trusted Platform Module (TPM) is enabled on the instance.""")
@cli_util.option('--platform-config-is-measured-boot-enabled', type=click.BOOL, help=u"""Whether the Measured Boot feature is enabled on the instance.""")
@cli_util.option('--platform-config-is-memory-encryption-enabled', type=click.BOOL, help=u"""Whether the instance is a confidential instance. If this value is `true`, the instance is a confidential instance. The default value is `false`.""")
+@cli_util.option('--platform-config-numa-nodes-per-socket', type=custom_types.CliCaseInsensitiveChoice(["NPS1", "NPS2"]), help=u"""The number of NUMA nodes per socket (NPS).""")
@cli_util.option('--platform-config-is-symmetric-multi-threading-enabled', type=click.BOOL, help=u"""Whether symmetric multithreading is enabled on the instance. Symmetric multithreading is also called simultaneous multithreading (SMT) or Intel Hyper-Threading.
Intel and AMD processors have two hardware execution threads per core (OCPU). SMT permits multiple independent threads of execution, to better use the resources and increase the efficiency of the CPU. When multithreading is disabled, only one thread is permitted to run on each core, which can provide higher or more predictable performance for some workloads.""")
+@cli_util.option('--platform-config-is-input-output-memory-management-unit-enabled', type=click.BOOL, help=u"""Whether the input-output memory management unit is enabled.""")
+@cli_util.option('--platform-config-percentage-of-cores-enabled', type=click.INT, help=u"""The percentage of cores enabled. Value must be a multiple of 25%. If the requested percentage results in a fractional number of cores, the system rounds up the number of cores across processors and provisions an instance with a whole number of cores.
+
+If the applications that you run on the instance use a core-based licensing model and need fewer cores than the full size of the shape, you can disable cores to reduce your licensing costs. The instance itself is billed for the full shape, regardless of whether all cores are enabled.""")
+@cli_util.option('--platform-config-config-map', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Instance Platform Configuration Configuration Map for flexible setting input.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["MOVING", "PROVISIONING", "RUNNING", "STARTING", "STOPPING", "STOPPED", "CREATING_IMAGE", "TERMINATING", "TERMINATED"]), 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 MOVING --wait-for-state TERMINATED 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({'create-vnic-details': {'module': 'core', 'class': 'CreateVnicDetails'}, 'defined-tags': {'module': 'core', 'class': 'dict(str, dict(str, object))'}, 'security-attributes': {'module': 'core', 'class': 'dict(str, dict(str, object))'}, 'extended-metadata': {'module': 'core', 'class': 'dict(str, object)'}, 'freeform-tags': {'module': 'core', 'class': 'dict(str, string)'}, 'launch-options': {'module': 'core', 'class': 'LaunchOptions'}, 'instance-options': {'module': 'core', 'class': 'InstanceOptions'}, 'availability-config': {'module': 'core', 'class': 'LaunchInstanceAvailabilityConfigDetails'}, 'preemptible-instance-config': {'module': 'core', 'class': 'PreemptibleInstanceConfigDetails'}, 'metadata': {'module': 'core', 'class': 'dict(str, string)'}, 'agent-config': {'module': 'core', 'class': 'LaunchInstanceAgentConfigDetails'}, 'shape-config': {'module': 'core', 'class': 'LaunchInstanceShapeConfigDetails'}, 'source-details': {'module': 'core', 'class': 'InstanceSourceDetails'}, 'launch-volume-attachments': {'module': 'core', 'class': 'list[LaunchAttachVolumeDetails]'}, 'placement-constraint-details': {'module': 'core', 'class': 'PlacementConstraintDetails'}, 'licensing-configs': {'module': 'core', 'class': 'list[LaunchInstanceLicensingConfig]'}})
+@json_skeleton_utils.get_cli_json_input_option({'create-vnic-details': {'module': 'core', 'class': 'CreateVnicDetails'}, 'defined-tags': {'module': 'core', 'class': 'dict(str, dict(str, object))'}, 'security-attributes': {'module': 'core', 'class': 'dict(str, dict(str, object))'}, 'extended-metadata': {'module': 'core', 'class': 'dict(str, object)'}, 'freeform-tags': {'module': 'core', 'class': 'dict(str, string)'}, 'launch-options': {'module': 'core', 'class': 'LaunchOptions'}, 'instance-options': {'module': 'core', 'class': 'InstanceOptions'}, 'availability-config': {'module': 'core', 'class': 'LaunchInstanceAvailabilityConfigDetails'}, 'preemptible-instance-config': {'module': 'core', 'class': 'PreemptibleInstanceConfigDetails'}, 'metadata': {'module': 'core', 'class': 'dict(str, string)'}, 'agent-config': {'module': 'core', 'class': 'LaunchInstanceAgentConfigDetails'}, 'shape-config': {'module': 'core', 'class': 'LaunchInstanceShapeConfigDetails'}, 'source-details': {'module': 'core', 'class': 'InstanceSourceDetails'}, 'launch-volume-attachments': {'module': 'core', 'class': 'list[LaunchAttachVolumeDetails]'}, 'placement-constraint-details': {'module': 'core', 'class': 'PlacementConstraintDetails'}, 'licensing-configs': {'module': 'core', 'class': 'list[LaunchInstanceLicensingConfig]'}, 'platform-config-config-map': {'module': 'core', 'class': 'dict(str, string)'}})
@cli_util.help_option
@click.pass_context
-@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'create-vnic-details': {'module': 'core', 'class': 'CreateVnicDetails'}, 'defined-tags': {'module': 'core', 'class': 'dict(str, dict(str, object))'}, 'security-attributes': {'module': 'core', 'class': 'dict(str, dict(str, object))'}, 'extended-metadata': {'module': 'core', 'class': 'dict(str, object)'}, 'freeform-tags': {'module': 'core', 'class': 'dict(str, string)'}, 'launch-options': {'module': 'core', 'class': 'LaunchOptions'}, 'instance-options': {'module': 'core', 'class': 'InstanceOptions'}, 'availability-config': {'module': 'core', 'class': 'LaunchInstanceAvailabilityConfigDetails'}, 'preemptible-instance-config': {'module': 'core', 'class': 'PreemptibleInstanceConfigDetails'}, 'metadata': {'module': 'core', 'class': 'dict(str, string)'}, 'agent-config': {'module': 'core', 'class': 'LaunchInstanceAgentConfigDetails'}, 'shape-config': {'module': 'core', 'class': 'LaunchInstanceShapeConfigDetails'}, 'source-details': {'module': 'core', 'class': 'InstanceSourceDetails'}, 'launch-volume-attachments': {'module': 'core', 'class': 'list[LaunchAttachVolumeDetails]'}, 'placement-constraint-details': {'module': 'core', 'class': 'PlacementConstraintDetails'}, 'licensing-configs': {'module': 'core', 'class': 'list[LaunchInstanceLicensingConfig]'}}, output_type={'module': 'core', 'class': 'Instance'})
+@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'create-vnic-details': {'module': 'core', 'class': 'CreateVnicDetails'}, 'defined-tags': {'module': 'core', 'class': 'dict(str, dict(str, object))'}, 'security-attributes': {'module': 'core', 'class': 'dict(str, dict(str, object))'}, 'extended-metadata': {'module': 'core', 'class': 'dict(str, object)'}, 'freeform-tags': {'module': 'core', 'class': 'dict(str, string)'}, 'launch-options': {'module': 'core', 'class': 'LaunchOptions'}, 'instance-options': {'module': 'core', 'class': 'InstanceOptions'}, 'availability-config': {'module': 'core', 'class': 'LaunchInstanceAvailabilityConfigDetails'}, 'preemptible-instance-config': {'module': 'core', 'class': 'PreemptibleInstanceConfigDetails'}, 'metadata': {'module': 'core', 'class': 'dict(str, string)'}, 'agent-config': {'module': 'core', 'class': 'LaunchInstanceAgentConfigDetails'}, 'shape-config': {'module': 'core', 'class': 'LaunchInstanceShapeConfigDetails'}, 'source-details': {'module': 'core', 'class': 'InstanceSourceDetails'}, 'launch-volume-attachments': {'module': 'core', 'class': 'list[LaunchAttachVolumeDetails]'}, 'placement-constraint-details': {'module': 'core', 'class': 'PlacementConstraintDetails'}, 'licensing-configs': {'module': 'core', 'class': 'list[LaunchInstanceLicensingConfig]'}, 'platform-config-config-map': {'module': 'core', 'class': 'dict(str, string)'}}, output_type={'module': 'core', 'class': 'Instance'})
@cli_util.wrap_exceptions
-def launch_instance_intel_vm_launch_instance_platform_config(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, availability_domain, compartment_id, capacity_reservation_id, create_vnic_details, dedicated_vm_host_id, defined_tags, security_attributes, display_name, extended_metadata, fault_domain, cluster_placement_group_id, freeform_tags, compute_cluster_id, hostname_label, image_id, ipxe_script_file, launch_options, instance_options, availability_config, preemptible_instance_config, metadata, agent_config, shape, shape_config, source_details, subnet_id, launch_volume_attachments, is_pv_encryption_in_transit_enabled, placement_constraint_details, is_ai_enterprise_enabled, instance_configuration_id, licensing_configs, platform_config_is_secure_boot_enabled, platform_config_is_trusted_platform_module_enabled, platform_config_is_measured_boot_enabled, platform_config_is_memory_encryption_enabled, platform_config_is_symmetric_multi_threading_enabled):
+def launch_instance_intel_skylake_bm_launch_instance_platform_config(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, availability_domain, compartment_id, capacity_reservation_id, create_vnic_details, dedicated_vm_host_id, defined_tags, security_attributes, display_name, extended_metadata, fault_domain, cluster_placement_group_id, freeform_tags, compute_cluster_id, hostname_label, image_id, ipxe_script_file, launch_options, instance_options, availability_config, preemptible_instance_config, metadata, agent_config, shape, shape_config, source_details, subnet_id, launch_volume_attachments, is_pv_encryption_in_transit_enabled, placement_constraint_details, is_ai_enterprise_enabled, instance_configuration_id, licensing_configs, platform_config_is_secure_boot_enabled, platform_config_is_trusted_platform_module_enabled, platform_config_is_measured_boot_enabled, platform_config_is_memory_encryption_enabled, platform_config_numa_nodes_per_socket, platform_config_is_symmetric_multi_threading_enabled, platform_config_is_input_output_memory_management_unit_enabled, platform_config_percentage_of_cores_enabled, platform_config_config_map):
kwargs = {}
@@ -7229,10 +7892,22 @@ def launch_instance_intel_vm_launch_instance_platform_config(ctx, from_json, wai
if platform_config_is_memory_encryption_enabled is not None:
_details['platformConfig']['isMemoryEncryptionEnabled'] = platform_config_is_memory_encryption_enabled
+ if platform_config_numa_nodes_per_socket is not None:
+ _details['platformConfig']['numaNodesPerSocket'] = platform_config_numa_nodes_per_socket
+
if platform_config_is_symmetric_multi_threading_enabled is not None:
_details['platformConfig']['isSymmetricMultiThreadingEnabled'] = platform_config_is_symmetric_multi_threading_enabled
- _details['platformConfig']['type'] = 'INTEL_VM'
+ if platform_config_is_input_output_memory_management_unit_enabled is not None:
+ _details['platformConfig']['isInputOutputMemoryManagementUnitEnabled'] = platform_config_is_input_output_memory_management_unit_enabled
+
+ if platform_config_percentage_of_cores_enabled is not None:
+ _details['platformConfig']['percentageOfCoresEnabled'] = platform_config_percentage_of_cores_enabled
+
+ if platform_config_config_map is not None:
+ _details['platformConfig']['configMap'] = cli_util.parse_json_parameter("platform_config_config_map", platform_config_config_map)
+
+ _details['platformConfig']['type'] = 'INTEL_SKYLAKE_BM'
client = cli_util.build_client('core', 'compute', ctx)
result = client.launch_instance(
@@ -7265,7 +7940,7 @@ def launch_instance_intel_vm_launch_instance_platform_config(ctx, from_json, wai
cli_util.render_response(result, ctx)
-@instance_group.command(name=cli_util.override('compute.launch_instance_intel_skylake_bm_launch_instance_platform_config.command_name', 'launch-instance-intel-skylake-bm-launch-instance-platform-config'), help=u"""Creates a new instance in the specified compartment and the specified availability domain. For general information about instances, see [Overview of the Compute Service].
+@instance_group.command(name=cli_util.override('compute.launch_instance_amd_milan_bm_launch_instance_platform_config.command_name', 'launch-instance-amd-milan-bm-launch-instance-platform-config'), help=u"""Creates a new instance in the specified compartment and the specified availability domain. For general information about instances, see [Overview of the Compute Service].
For information about access control and compartments, see [Overview of the IAM Service].
@@ -7382,10 +8057,12 @@ def launch_instance_intel_vm_launch_instance_platform_config(ctx, from_json, wai
@cli_util.option('--platform-config-is-trusted-platform-module-enabled', type=click.BOOL, help=u"""Whether the Trusted Platform Module (TPM) is enabled on the instance.""")
@cli_util.option('--platform-config-is-measured-boot-enabled', type=click.BOOL, help=u"""Whether the Measured Boot feature is enabled on the instance.""")
@cli_util.option('--platform-config-is-memory-encryption-enabled', type=click.BOOL, help=u"""Whether the instance is a confidential instance. If this value is `true`, the instance is a confidential instance. The default value is `false`.""")
-@cli_util.option('--platform-config-numa-nodes-per-socket', type=custom_types.CliCaseInsensitiveChoice(["NPS1", "NPS2"]), help=u"""The number of NUMA nodes per socket (NPS).""")
+@cli_util.option('--platform-config-numa-nodes-per-socket', type=custom_types.CliCaseInsensitiveChoice(["NPS0", "NPS1", "NPS2", "NPS4", "NPS6"]), help=u"""The number of NUMA nodes per socket (NPS).""")
@cli_util.option('--platform-config-is-symmetric-multi-threading-enabled', type=click.BOOL, help=u"""Whether symmetric multithreading is enabled on the instance. Symmetric multithreading is also called simultaneous multithreading (SMT) or Intel Hyper-Threading.
Intel and AMD processors have two hardware execution threads per core (OCPU). SMT permits multiple independent threads of execution, to better use the resources and increase the efficiency of the CPU. When multithreading is disabled, only one thread is permitted to run on each core, which can provide higher or more predictable performance for some workloads.""")
+@cli_util.option('--platform-config-is-access-control-service-enabled', type=click.BOOL, help=u"""Whether the Access Control Service is enabled on the instance. When enabled, the platform can enforce PCIe device isolation, required for VFIO device pass-through.""")
+@cli_util.option('--platform-config-are-virtual-instructions-enabled', type=click.BOOL, help=u"""Whether virtualization instructions are available. For example, Secure Virtual Machine for AMD shapes or VT-x for Intel shapes.""")
@cli_util.option('--platform-config-is-input-output-memory-management-unit-enabled', type=click.BOOL, help=u"""Whether the input-output memory management unit is enabled.""")
@cli_util.option('--platform-config-percentage-of-cores-enabled', type=click.INT, help=u"""The percentage of cores enabled. Value must be a multiple of 25%. If the requested percentage results in a fractional number of cores, the system rounds up the number of cores across processors and provisions an instance with a whole number of cores.
@@ -7399,7 +8076,7 @@ def launch_instance_intel_vm_launch_instance_platform_config(ctx, from_json, wai
@click.pass_context
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'create-vnic-details': {'module': 'core', 'class': 'CreateVnicDetails'}, 'defined-tags': {'module': 'core', 'class': 'dict(str, dict(str, object))'}, 'security-attributes': {'module': 'core', 'class': 'dict(str, dict(str, object))'}, 'extended-metadata': {'module': 'core', 'class': 'dict(str, object)'}, 'freeform-tags': {'module': 'core', 'class': 'dict(str, string)'}, 'launch-options': {'module': 'core', 'class': 'LaunchOptions'}, 'instance-options': {'module': 'core', 'class': 'InstanceOptions'}, 'availability-config': {'module': 'core', 'class': 'LaunchInstanceAvailabilityConfigDetails'}, 'preemptible-instance-config': {'module': 'core', 'class': 'PreemptibleInstanceConfigDetails'}, 'metadata': {'module': 'core', 'class': 'dict(str, string)'}, 'agent-config': {'module': 'core', 'class': 'LaunchInstanceAgentConfigDetails'}, 'shape-config': {'module': 'core', 'class': 'LaunchInstanceShapeConfigDetails'}, 'source-details': {'module': 'core', 'class': 'InstanceSourceDetails'}, 'launch-volume-attachments': {'module': 'core', 'class': 'list[LaunchAttachVolumeDetails]'}, 'placement-constraint-details': {'module': 'core', 'class': 'PlacementConstraintDetails'}, 'licensing-configs': {'module': 'core', 'class': 'list[LaunchInstanceLicensingConfig]'}, 'platform-config-config-map': {'module': 'core', 'class': 'dict(str, string)'}}, output_type={'module': 'core', 'class': 'Instance'})
@cli_util.wrap_exceptions
-def launch_instance_intel_skylake_bm_launch_instance_platform_config(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, availability_domain, compartment_id, capacity_reservation_id, create_vnic_details, dedicated_vm_host_id, defined_tags, security_attributes, display_name, extended_metadata, fault_domain, cluster_placement_group_id, freeform_tags, compute_cluster_id, hostname_label, image_id, ipxe_script_file, launch_options, instance_options, availability_config, preemptible_instance_config, metadata, agent_config, shape, shape_config, source_details, subnet_id, launch_volume_attachments, is_pv_encryption_in_transit_enabled, placement_constraint_details, is_ai_enterprise_enabled, instance_configuration_id, licensing_configs, platform_config_is_secure_boot_enabled, platform_config_is_trusted_platform_module_enabled, platform_config_is_measured_boot_enabled, platform_config_is_memory_encryption_enabled, platform_config_numa_nodes_per_socket, platform_config_is_symmetric_multi_threading_enabled, platform_config_is_input_output_memory_management_unit_enabled, platform_config_percentage_of_cores_enabled, platform_config_config_map):
+def launch_instance_amd_milan_bm_launch_instance_platform_config(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, availability_domain, compartment_id, capacity_reservation_id, create_vnic_details, dedicated_vm_host_id, defined_tags, security_attributes, display_name, extended_metadata, fault_domain, cluster_placement_group_id, freeform_tags, compute_cluster_id, hostname_label, image_id, ipxe_script_file, launch_options, instance_options, availability_config, preemptible_instance_config, metadata, agent_config, shape, shape_config, source_details, subnet_id, launch_volume_attachments, is_pv_encryption_in_transit_enabled, placement_constraint_details, is_ai_enterprise_enabled, instance_configuration_id, licensing_configs, platform_config_is_secure_boot_enabled, platform_config_is_trusted_platform_module_enabled, platform_config_is_measured_boot_enabled, platform_config_is_memory_encryption_enabled, platform_config_numa_nodes_per_socket, platform_config_is_symmetric_multi_threading_enabled, platform_config_is_access_control_service_enabled, platform_config_are_virtual_instructions_enabled, platform_config_is_input_output_memory_management_unit_enabled, platform_config_percentage_of_cores_enabled, platform_config_config_map):
kwargs = {}
@@ -7516,6 +8193,12 @@ def launch_instance_intel_skylake_bm_launch_instance_platform_config(ctx, from_j
if platform_config_is_symmetric_multi_threading_enabled is not None:
_details['platformConfig']['isSymmetricMultiThreadingEnabled'] = platform_config_is_symmetric_multi_threading_enabled
+ if platform_config_is_access_control_service_enabled is not None:
+ _details['platformConfig']['isAccessControlServiceEnabled'] = platform_config_is_access_control_service_enabled
+
+ if platform_config_are_virtual_instructions_enabled is not None:
+ _details['platformConfig']['areVirtualInstructionsEnabled'] = platform_config_are_virtual_instructions_enabled
+
if platform_config_is_input_output_memory_management_unit_enabled is not None:
_details['platformConfig']['isInputOutputMemoryManagementUnitEnabled'] = platform_config_is_input_output_memory_management_unit_enabled
@@ -7525,7 +8208,7 @@ def launch_instance_intel_skylake_bm_launch_instance_platform_config(ctx, from_j
if platform_config_config_map is not None:
_details['platformConfig']['configMap'] = cli_util.parse_json_parameter("platform_config_config_map", platform_config_config_map)
- _details['platformConfig']['type'] = 'INTEL_SKYLAKE_BM'
+ _details['platformConfig']['type'] = 'AMD_MILAN_BM'
client = cli_util.build_client('core', 'compute', ctx)
result = client.launch_instance(
@@ -7558,7 +8241,7 @@ def launch_instance_intel_skylake_bm_launch_instance_platform_config(ctx, from_j
cli_util.render_response(result, ctx)
-@instance_group.command(name=cli_util.override('compute.launch_instance_amd_milan_bm_launch_instance_platform_config.command_name', 'launch-instance-amd-milan-bm-launch-instance-platform-config'), help=u"""Creates a new instance in the specified compartment and the specified availability domain. For general information about instances, see [Overview of the Compute Service].
+@instance_group.command(name=cli_util.override('compute.launch_instance_generic_bm_launch_instance_platform_config.command_name', 'launch-instance-generic-bm-launch-instance-platform-config'), help=u"""Creates a new instance in the specified compartment and the specified availability domain. For general information about instances, see [Overview of the Compute Service].
For information about access control and compartments, see [Overview of the IAM Service].
@@ -7694,7 +8377,7 @@ def launch_instance_intel_skylake_bm_launch_instance_platform_config(ctx, from_j
@click.pass_context
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'create-vnic-details': {'module': 'core', 'class': 'CreateVnicDetails'}, 'defined-tags': {'module': 'core', 'class': 'dict(str, dict(str, object))'}, 'security-attributes': {'module': 'core', 'class': 'dict(str, dict(str, object))'}, 'extended-metadata': {'module': 'core', 'class': 'dict(str, object)'}, 'freeform-tags': {'module': 'core', 'class': 'dict(str, string)'}, 'launch-options': {'module': 'core', 'class': 'LaunchOptions'}, 'instance-options': {'module': 'core', 'class': 'InstanceOptions'}, 'availability-config': {'module': 'core', 'class': 'LaunchInstanceAvailabilityConfigDetails'}, 'preemptible-instance-config': {'module': 'core', 'class': 'PreemptibleInstanceConfigDetails'}, 'metadata': {'module': 'core', 'class': 'dict(str, string)'}, 'agent-config': {'module': 'core', 'class': 'LaunchInstanceAgentConfigDetails'}, 'shape-config': {'module': 'core', 'class': 'LaunchInstanceShapeConfigDetails'}, 'source-details': {'module': 'core', 'class': 'InstanceSourceDetails'}, 'launch-volume-attachments': {'module': 'core', 'class': 'list[LaunchAttachVolumeDetails]'}, 'placement-constraint-details': {'module': 'core', 'class': 'PlacementConstraintDetails'}, 'licensing-configs': {'module': 'core', 'class': 'list[LaunchInstanceLicensingConfig]'}, 'platform-config-config-map': {'module': 'core', 'class': 'dict(str, string)'}}, output_type={'module': 'core', 'class': 'Instance'})
@cli_util.wrap_exceptions
-def launch_instance_amd_milan_bm_launch_instance_platform_config(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, availability_domain, compartment_id, capacity_reservation_id, create_vnic_details, dedicated_vm_host_id, defined_tags, security_attributes, display_name, extended_metadata, fault_domain, cluster_placement_group_id, freeform_tags, compute_cluster_id, hostname_label, image_id, ipxe_script_file, launch_options, instance_options, availability_config, preemptible_instance_config, metadata, agent_config, shape, shape_config, source_details, subnet_id, launch_volume_attachments, is_pv_encryption_in_transit_enabled, placement_constraint_details, is_ai_enterprise_enabled, instance_configuration_id, licensing_configs, platform_config_is_secure_boot_enabled, platform_config_is_trusted_platform_module_enabled, platform_config_is_measured_boot_enabled, platform_config_is_memory_encryption_enabled, platform_config_numa_nodes_per_socket, platform_config_is_symmetric_multi_threading_enabled, platform_config_is_access_control_service_enabled, platform_config_are_virtual_instructions_enabled, platform_config_is_input_output_memory_management_unit_enabled, platform_config_percentage_of_cores_enabled, platform_config_config_map):
+def launch_instance_generic_bm_launch_instance_platform_config(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, availability_domain, compartment_id, capacity_reservation_id, create_vnic_details, dedicated_vm_host_id, defined_tags, security_attributes, display_name, extended_metadata, fault_domain, cluster_placement_group_id, freeform_tags, compute_cluster_id, hostname_label, image_id, ipxe_script_file, launch_options, instance_options, availability_config, preemptible_instance_config, metadata, agent_config, shape, shape_config, source_details, subnet_id, launch_volume_attachments, is_pv_encryption_in_transit_enabled, placement_constraint_details, is_ai_enterprise_enabled, instance_configuration_id, licensing_configs, platform_config_is_secure_boot_enabled, platform_config_is_trusted_platform_module_enabled, platform_config_is_measured_boot_enabled, platform_config_is_memory_encryption_enabled, platform_config_numa_nodes_per_socket, platform_config_is_symmetric_multi_threading_enabled, platform_config_is_access_control_service_enabled, platform_config_are_virtual_instructions_enabled, platform_config_is_input_output_memory_management_unit_enabled, platform_config_percentage_of_cores_enabled, platform_config_config_map):
kwargs = {}
@@ -7826,7 +8509,7 @@ def launch_instance_amd_milan_bm_launch_instance_platform_config(ctx, from_json,
if platform_config_config_map is not None:
_details['platformConfig']['configMap'] = cli_util.parse_json_parameter("platform_config_config_map", platform_config_config_map)
- _details['platformConfig']['type'] = 'AMD_MILAN_BM'
+ _details['platformConfig']['type'] = 'GENERIC_BM'
client = cli_util.build_client('core', 'compute', ctx)
result = client.launch_instance(
@@ -7859,7 +8542,7 @@ def launch_instance_amd_milan_bm_launch_instance_platform_config(ctx, from_json,
cli_util.render_response(result, ctx)
-@instance_group.command(name=cli_util.override('compute.launch_instance_generic_bm_launch_instance_platform_config.command_name', 'launch-instance-generic-bm-launch-instance-platform-config'), help=u"""Creates a new instance in the specified compartment and the specified availability domain. For general information about instances, see [Overview of the Compute Service].
+@instance_group.command(name=cli_util.override('compute.launch_instance_amd_milan_bm_gpu_launch_instance_platform_config.command_name', 'launch-instance-amd-milan-bm-gpu-launch-instance-platform-config'), help=u"""Creates a new instance in the specified compartment and the specified availability domain. For general information about instances, see [Overview of the Compute Service].
For information about access control and compartments, see [Overview of the IAM Service].
@@ -7983,9 +8666,6 @@ def launch_instance_amd_milan_bm_launch_instance_platform_config(ctx, from_json,
@cli_util.option('--platform-config-is-access-control-service-enabled', type=click.BOOL, help=u"""Whether the Access Control Service is enabled on the instance. When enabled, the platform can enforce PCIe device isolation, required for VFIO device pass-through.""")
@cli_util.option('--platform-config-are-virtual-instructions-enabled', type=click.BOOL, help=u"""Whether virtualization instructions are available. For example, Secure Virtual Machine for AMD shapes or VT-x for Intel shapes.""")
@cli_util.option('--platform-config-is-input-output-memory-management-unit-enabled', type=click.BOOL, help=u"""Whether the input-output memory management unit is enabled.""")
-@cli_util.option('--platform-config-percentage-of-cores-enabled', type=click.INT, help=u"""The percentage of cores enabled. Value must be a multiple of 25%. If the requested percentage results in a fractional number of cores, the system rounds up the number of cores across processors and provisions an instance with a whole number of cores.
-
-If the applications that you run on the instance use a core-based licensing model and need fewer cores than the full size of the shape, you can disable cores to reduce your licensing costs. The instance itself is billed for the full shape, regardless of whether all cores are enabled.""")
@cli_util.option('--platform-config-config-map', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Instance Platform Configuration Configuration Map for flexible setting input.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["MOVING", "PROVISIONING", "RUNNING", "STARTING", "STOPPING", "STOPPED", "CREATING_IMAGE", "TERMINATING", "TERMINATED"]), 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 MOVING --wait-for-state TERMINATED 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.""")
@@ -7995,7 +8675,7 @@ def launch_instance_amd_milan_bm_launch_instance_platform_config(ctx, from_json,
@click.pass_context
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'create-vnic-details': {'module': 'core', 'class': 'CreateVnicDetails'}, 'defined-tags': {'module': 'core', 'class': 'dict(str, dict(str, object))'}, 'security-attributes': {'module': 'core', 'class': 'dict(str, dict(str, object))'}, 'extended-metadata': {'module': 'core', 'class': 'dict(str, object)'}, 'freeform-tags': {'module': 'core', 'class': 'dict(str, string)'}, 'launch-options': {'module': 'core', 'class': 'LaunchOptions'}, 'instance-options': {'module': 'core', 'class': 'InstanceOptions'}, 'availability-config': {'module': 'core', 'class': 'LaunchInstanceAvailabilityConfigDetails'}, 'preemptible-instance-config': {'module': 'core', 'class': 'PreemptibleInstanceConfigDetails'}, 'metadata': {'module': 'core', 'class': 'dict(str, string)'}, 'agent-config': {'module': 'core', 'class': 'LaunchInstanceAgentConfigDetails'}, 'shape-config': {'module': 'core', 'class': 'LaunchInstanceShapeConfigDetails'}, 'source-details': {'module': 'core', 'class': 'InstanceSourceDetails'}, 'launch-volume-attachments': {'module': 'core', 'class': 'list[LaunchAttachVolumeDetails]'}, 'placement-constraint-details': {'module': 'core', 'class': 'PlacementConstraintDetails'}, 'licensing-configs': {'module': 'core', 'class': 'list[LaunchInstanceLicensingConfig]'}, 'platform-config-config-map': {'module': 'core', 'class': 'dict(str, string)'}}, output_type={'module': 'core', 'class': 'Instance'})
@cli_util.wrap_exceptions
-def launch_instance_generic_bm_launch_instance_platform_config(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, availability_domain, compartment_id, capacity_reservation_id, create_vnic_details, dedicated_vm_host_id, defined_tags, security_attributes, display_name, extended_metadata, fault_domain, cluster_placement_group_id, freeform_tags, compute_cluster_id, hostname_label, image_id, ipxe_script_file, launch_options, instance_options, availability_config, preemptible_instance_config, metadata, agent_config, shape, shape_config, source_details, subnet_id, launch_volume_attachments, is_pv_encryption_in_transit_enabled, placement_constraint_details, is_ai_enterprise_enabled, instance_configuration_id, licensing_configs, platform_config_is_secure_boot_enabled, platform_config_is_trusted_platform_module_enabled, platform_config_is_measured_boot_enabled, platform_config_is_memory_encryption_enabled, platform_config_numa_nodes_per_socket, platform_config_is_symmetric_multi_threading_enabled, platform_config_is_access_control_service_enabled, platform_config_are_virtual_instructions_enabled, platform_config_is_input_output_memory_management_unit_enabled, platform_config_percentage_of_cores_enabled, platform_config_config_map):
+def launch_instance_amd_milan_bm_gpu_launch_instance_platform_config(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, availability_domain, compartment_id, capacity_reservation_id, create_vnic_details, dedicated_vm_host_id, defined_tags, security_attributes, display_name, extended_metadata, fault_domain, cluster_placement_group_id, freeform_tags, compute_cluster_id, hostname_label, image_id, ipxe_script_file, launch_options, instance_options, availability_config, preemptible_instance_config, metadata, agent_config, shape, shape_config, source_details, subnet_id, launch_volume_attachments, is_pv_encryption_in_transit_enabled, placement_constraint_details, is_ai_enterprise_enabled, instance_configuration_id, licensing_configs, platform_config_is_secure_boot_enabled, platform_config_is_trusted_platform_module_enabled, platform_config_is_measured_boot_enabled, platform_config_is_memory_encryption_enabled, platform_config_numa_nodes_per_socket, platform_config_is_symmetric_multi_threading_enabled, platform_config_is_access_control_service_enabled, platform_config_are_virtual_instructions_enabled, platform_config_is_input_output_memory_management_unit_enabled, platform_config_config_map):
kwargs = {}
@@ -8121,13 +8801,10 @@ def launch_instance_generic_bm_launch_instance_platform_config(ctx, from_json, w
if platform_config_is_input_output_memory_management_unit_enabled is not None:
_details['platformConfig']['isInputOutputMemoryManagementUnitEnabled'] = platform_config_is_input_output_memory_management_unit_enabled
- if platform_config_percentage_of_cores_enabled is not None:
- _details['platformConfig']['percentageOfCoresEnabled'] = platform_config_percentage_of_cores_enabled
-
if platform_config_config_map is not None:
_details['platformConfig']['configMap'] = cli_util.parse_json_parameter("platform_config_config_map", platform_config_config_map)
- _details['platformConfig']['type'] = 'GENERIC_BM'
+ _details['platformConfig']['type'] = 'AMD_MILAN_BM_GPU'
client = cli_util.build_client('core', 'compute', ctx)
result = client.launch_instance(
@@ -8160,7 +8837,7 @@ def launch_instance_generic_bm_launch_instance_platform_config(ctx, from_json, w
cli_util.render_response(result, ctx)
-@instance_group.command(name=cli_util.override('compute.launch_instance_amd_milan_bm_gpu_launch_instance_platform_config.command_name', 'launch-instance-amd-milan-bm-gpu-launch-instance-platform-config'), help=u"""Creates a new instance in the specified compartment and the specified availability domain. For general information about instances, see [Overview of the Compute Service].
+@instance_group.command(name=cli_util.override('compute.launch_instance_host_group_placement_constraint_details.command_name', 'launch-instance-host-group-placement-constraint-details'), help=u"""Creates a new instance in the specified compartment and the specified availability domain. For general information about instances, see [Overview of the Compute Service].
For information about access control and compartments, see [Overview of the IAM Service].
@@ -8183,6 +8860,7 @@ def launch_instance_generic_bm_launch_instance_platform_config(ctx, from_json, w
Example: `Uocm:PHX-AD-1`""")
@cli_util.option('--compartment-id', required=True, help=u"""The OCID of the compartment.""")
+@cli_util.option('--placement-constraint-details-compute-host-group-id', required=True, help=u"""The OCID of the compute host group. This is only available for dedicated capacity customers.""")
@cli_util.option('--capacity-reservation-id', help=u"""The OCID of the compute capacity reservation this instance is launched under. You can opt out of all default reservations by specifying an empty string as input for this field. For more information, see [Capacity Reservations].""")
@cli_util.option('--create-vnic-details', type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
@cli_util.option('--dedicated-vm-host-id', help=u"""The OCID of the dedicated virtual machine host to place the instance on.""")
@@ -8267,40 +8945,29 @@ def launch_instance_generic_bm_launch_instance_platform_config(ctx, from_json, w
This option is a JSON list with items of type LaunchAttachVolumeDetails. For documentation on LaunchAttachVolumeDetails please see our API reference: https://docs.oracle.com/en-us/iaas/api/#/en/iaas/20160918/datatypes/LaunchAttachVolumeDetails.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
@cli_util.option('--is-pv-encryption-in-transit-enabled', type=click.BOOL, help=u"""Whether to enable in-transit encryption for the data volume's paravirtualized attachment. This field applies to both block volumes and boot volumes. The default value is false.""")
-@cli_util.option('--placement-constraint-details', type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
+@cli_util.option('--platform-config', type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
@cli_util.option('--is-ai-enterprise-enabled', type=click.BOOL, help=u"""Whether to enable AI enterprise on the instance.""")
@cli_util.option('--instance-configuration-id', help=u"""The OCID of the Instance Configuration containing instance launch details. Any other fields supplied in this instance launch request will override the details stored in the Instance Configuration for this instance launch.""")
@cli_util.option('--licensing-configs', type=custom_types.CLI_COMPLEX_TYPE, help=u"""List of licensing configurations associated with target launch values.
This option is a JSON list with items of type LaunchInstanceLicensingConfig. For documentation on LaunchInstanceLicensingConfig please see our API reference: https://docs.oracle.com/en-us/iaas/api/#/en/iaas/20160918/datatypes/LaunchInstanceLicensingConfig.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
-@cli_util.option('--platform-config-is-secure-boot-enabled', type=click.BOOL, help=u"""Whether Secure Boot is enabled on the instance.""")
-@cli_util.option('--platform-config-is-trusted-platform-module-enabled', type=click.BOOL, help=u"""Whether the Trusted Platform Module (TPM) is enabled on the instance.""")
-@cli_util.option('--platform-config-is-measured-boot-enabled', type=click.BOOL, help=u"""Whether the Measured Boot feature is enabled on the instance.""")
-@cli_util.option('--platform-config-is-memory-encryption-enabled', type=click.BOOL, help=u"""Whether the instance is a confidential instance. If this value is `true`, the instance is a confidential instance. The default value is `false`.""")
-@cli_util.option('--platform-config-numa-nodes-per-socket', type=custom_types.CliCaseInsensitiveChoice(["NPS0", "NPS1", "NPS2", "NPS4", "NPS6"]), help=u"""The number of NUMA nodes per socket (NPS).""")
-@cli_util.option('--platform-config-is-symmetric-multi-threading-enabled', type=click.BOOL, help=u"""Whether symmetric multithreading is enabled on the instance. Symmetric multithreading is also called simultaneous multithreading (SMT) or Intel Hyper-Threading.
-
-Intel and AMD processors have two hardware execution threads per core (OCPU). SMT permits multiple independent threads of execution, to better use the resources and increase the efficiency of the CPU. When multithreading is disabled, only one thread is permitted to run on each core, which can provide higher or more predictable performance for some workloads.""")
-@cli_util.option('--platform-config-is-access-control-service-enabled', type=click.BOOL, help=u"""Whether the Access Control Service is enabled on the instance. When enabled, the platform can enforce PCIe device isolation, required for VFIO device pass-through.""")
-@cli_util.option('--platform-config-are-virtual-instructions-enabled', type=click.BOOL, help=u"""Whether virtualization instructions are available. For example, Secure Virtual Machine for AMD shapes or VT-x for Intel shapes.""")
-@cli_util.option('--platform-config-is-input-output-memory-management-unit-enabled', type=click.BOOL, help=u"""Whether the input-output memory management unit is enabled.""")
-@cli_util.option('--platform-config-config-map', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Instance Platform Configuration Configuration Map for flexible setting input.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["MOVING", "PROVISIONING", "RUNNING", "STARTING", "STOPPING", "STOPPED", "CREATING_IMAGE", "TERMINATING", "TERMINATED"]), 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 MOVING --wait-for-state TERMINATED 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({'create-vnic-details': {'module': 'core', 'class': 'CreateVnicDetails'}, 'defined-tags': {'module': 'core', 'class': 'dict(str, dict(str, object))'}, 'security-attributes': {'module': 'core', 'class': 'dict(str, dict(str, object))'}, 'extended-metadata': {'module': 'core', 'class': 'dict(str, object)'}, 'freeform-tags': {'module': 'core', 'class': 'dict(str, string)'}, 'launch-options': {'module': 'core', 'class': 'LaunchOptions'}, 'instance-options': {'module': 'core', 'class': 'InstanceOptions'}, 'availability-config': {'module': 'core', 'class': 'LaunchInstanceAvailabilityConfigDetails'}, 'preemptible-instance-config': {'module': 'core', 'class': 'PreemptibleInstanceConfigDetails'}, 'metadata': {'module': 'core', 'class': 'dict(str, string)'}, 'agent-config': {'module': 'core', 'class': 'LaunchInstanceAgentConfigDetails'}, 'shape-config': {'module': 'core', 'class': 'LaunchInstanceShapeConfigDetails'}, 'source-details': {'module': 'core', 'class': 'InstanceSourceDetails'}, 'launch-volume-attachments': {'module': 'core', 'class': 'list[LaunchAttachVolumeDetails]'}, 'placement-constraint-details': {'module': 'core', 'class': 'PlacementConstraintDetails'}, 'licensing-configs': {'module': 'core', 'class': 'list[LaunchInstanceLicensingConfig]'}, 'platform-config-config-map': {'module': 'core', 'class': 'dict(str, string)'}})
+@json_skeleton_utils.get_cli_json_input_option({'create-vnic-details': {'module': 'core', 'class': 'CreateVnicDetails'}, 'defined-tags': {'module': 'core', 'class': 'dict(str, dict(str, object))'}, 'security-attributes': {'module': 'core', 'class': 'dict(str, dict(str, object))'}, 'extended-metadata': {'module': 'core', 'class': 'dict(str, object)'}, 'freeform-tags': {'module': 'core', 'class': 'dict(str, string)'}, 'launch-options': {'module': 'core', 'class': 'LaunchOptions'}, 'instance-options': {'module': 'core', 'class': 'InstanceOptions'}, 'availability-config': {'module': 'core', 'class': 'LaunchInstanceAvailabilityConfigDetails'}, 'preemptible-instance-config': {'module': 'core', 'class': 'PreemptibleInstanceConfigDetails'}, 'metadata': {'module': 'core', 'class': 'dict(str, string)'}, 'agent-config': {'module': 'core', 'class': 'LaunchInstanceAgentConfigDetails'}, 'shape-config': {'module': 'core', 'class': 'LaunchInstanceShapeConfigDetails'}, 'source-details': {'module': 'core', 'class': 'InstanceSourceDetails'}, 'launch-volume-attachments': {'module': 'core', 'class': 'list[LaunchAttachVolumeDetails]'}, 'platform-config': {'module': 'core', 'class': 'LaunchInstancePlatformConfig'}, 'licensing-configs': {'module': 'core', 'class': 'list[LaunchInstanceLicensingConfig]'}})
@cli_util.help_option
@click.pass_context
-@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'create-vnic-details': {'module': 'core', 'class': 'CreateVnicDetails'}, 'defined-tags': {'module': 'core', 'class': 'dict(str, dict(str, object))'}, 'security-attributes': {'module': 'core', 'class': 'dict(str, dict(str, object))'}, 'extended-metadata': {'module': 'core', 'class': 'dict(str, object)'}, 'freeform-tags': {'module': 'core', 'class': 'dict(str, string)'}, 'launch-options': {'module': 'core', 'class': 'LaunchOptions'}, 'instance-options': {'module': 'core', 'class': 'InstanceOptions'}, 'availability-config': {'module': 'core', 'class': 'LaunchInstanceAvailabilityConfigDetails'}, 'preemptible-instance-config': {'module': 'core', 'class': 'PreemptibleInstanceConfigDetails'}, 'metadata': {'module': 'core', 'class': 'dict(str, string)'}, 'agent-config': {'module': 'core', 'class': 'LaunchInstanceAgentConfigDetails'}, 'shape-config': {'module': 'core', 'class': 'LaunchInstanceShapeConfigDetails'}, 'source-details': {'module': 'core', 'class': 'InstanceSourceDetails'}, 'launch-volume-attachments': {'module': 'core', 'class': 'list[LaunchAttachVolumeDetails]'}, 'placement-constraint-details': {'module': 'core', 'class': 'PlacementConstraintDetails'}, 'licensing-configs': {'module': 'core', 'class': 'list[LaunchInstanceLicensingConfig]'}, 'platform-config-config-map': {'module': 'core', 'class': 'dict(str, string)'}}, output_type={'module': 'core', 'class': 'Instance'})
+@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'create-vnic-details': {'module': 'core', 'class': 'CreateVnicDetails'}, 'defined-tags': {'module': 'core', 'class': 'dict(str, dict(str, object))'}, 'security-attributes': {'module': 'core', 'class': 'dict(str, dict(str, object))'}, 'extended-metadata': {'module': 'core', 'class': 'dict(str, object)'}, 'freeform-tags': {'module': 'core', 'class': 'dict(str, string)'}, 'launch-options': {'module': 'core', 'class': 'LaunchOptions'}, 'instance-options': {'module': 'core', 'class': 'InstanceOptions'}, 'availability-config': {'module': 'core', 'class': 'LaunchInstanceAvailabilityConfigDetails'}, 'preemptible-instance-config': {'module': 'core', 'class': 'PreemptibleInstanceConfigDetails'}, 'metadata': {'module': 'core', 'class': 'dict(str, string)'}, 'agent-config': {'module': 'core', 'class': 'LaunchInstanceAgentConfigDetails'}, 'shape-config': {'module': 'core', 'class': 'LaunchInstanceShapeConfigDetails'}, 'source-details': {'module': 'core', 'class': 'InstanceSourceDetails'}, 'launch-volume-attachments': {'module': 'core', 'class': 'list[LaunchAttachVolumeDetails]'}, 'platform-config': {'module': 'core', 'class': 'LaunchInstancePlatformConfig'}, 'licensing-configs': {'module': 'core', 'class': 'list[LaunchInstanceLicensingConfig]'}}, output_type={'module': 'core', 'class': 'Instance'})
@cli_util.wrap_exceptions
-def launch_instance_amd_milan_bm_gpu_launch_instance_platform_config(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, availability_domain, compartment_id, capacity_reservation_id, create_vnic_details, dedicated_vm_host_id, defined_tags, security_attributes, display_name, extended_metadata, fault_domain, cluster_placement_group_id, freeform_tags, compute_cluster_id, hostname_label, image_id, ipxe_script_file, launch_options, instance_options, availability_config, preemptible_instance_config, metadata, agent_config, shape, shape_config, source_details, subnet_id, launch_volume_attachments, is_pv_encryption_in_transit_enabled, placement_constraint_details, is_ai_enterprise_enabled, instance_configuration_id, licensing_configs, platform_config_is_secure_boot_enabled, platform_config_is_trusted_platform_module_enabled, platform_config_is_measured_boot_enabled, platform_config_is_memory_encryption_enabled, platform_config_numa_nodes_per_socket, platform_config_is_symmetric_multi_threading_enabled, platform_config_is_access_control_service_enabled, platform_config_are_virtual_instructions_enabled, platform_config_is_input_output_memory_management_unit_enabled, platform_config_config_map):
+def launch_instance_host_group_placement_constraint_details(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, availability_domain, compartment_id, placement_constraint_details_compute_host_group_id, capacity_reservation_id, create_vnic_details, dedicated_vm_host_id, defined_tags, security_attributes, display_name, extended_metadata, fault_domain, cluster_placement_group_id, freeform_tags, compute_cluster_id, hostname_label, image_id, ipxe_script_file, launch_options, instance_options, availability_config, preemptible_instance_config, metadata, agent_config, shape, shape_config, source_details, subnet_id, launch_volume_attachments, is_pv_encryption_in_transit_enabled, platform_config, is_ai_enterprise_enabled, instance_configuration_id, licensing_configs):
kwargs = {}
_details = {}
- _details['platformConfig'] = {}
+ _details['placementConstraintDetails'] = {}
_details['availabilityDomain'] = availability_domain
_details['compartmentId'] = compartment_id
+ _details['placementConstraintDetails']['computeHostGroupId'] = placement_constraint_details_compute_host_group_id
if capacity_reservation_id is not None:
_details['capacityReservationId'] = capacity_reservation_id
@@ -8380,8 +9047,8 @@ def launch_instance_amd_milan_bm_gpu_launch_instance_platform_config(ctx, from_j
if is_pv_encryption_in_transit_enabled is not None:
_details['isPvEncryptionInTransitEnabled'] = is_pv_encryption_in_transit_enabled
- if placement_constraint_details is not None:
- _details['placementConstraintDetails'] = cli_util.parse_json_parameter("placement_constraint_details", placement_constraint_details)
+ if platform_config is not None:
+ _details['platformConfig'] = cli_util.parse_json_parameter("platform_config", platform_config)
if is_ai_enterprise_enabled is not None:
_details['isAIEnterpriseEnabled'] = is_ai_enterprise_enabled
@@ -8392,37 +9059,7 @@ def launch_instance_amd_milan_bm_gpu_launch_instance_platform_config(ctx, from_j
if licensing_configs is not None:
_details['licensingConfigs'] = cli_util.parse_json_parameter("licensing_configs", licensing_configs)
- if platform_config_is_secure_boot_enabled is not None:
- _details['platformConfig']['isSecureBootEnabled'] = platform_config_is_secure_boot_enabled
-
- if platform_config_is_trusted_platform_module_enabled is not None:
- _details['platformConfig']['isTrustedPlatformModuleEnabled'] = platform_config_is_trusted_platform_module_enabled
-
- if platform_config_is_measured_boot_enabled is not None:
- _details['platformConfig']['isMeasuredBootEnabled'] = platform_config_is_measured_boot_enabled
-
- if platform_config_is_memory_encryption_enabled is not None:
- _details['platformConfig']['isMemoryEncryptionEnabled'] = platform_config_is_memory_encryption_enabled
-
- if platform_config_numa_nodes_per_socket is not None:
- _details['platformConfig']['numaNodesPerSocket'] = platform_config_numa_nodes_per_socket
-
- if platform_config_is_symmetric_multi_threading_enabled is not None:
- _details['platformConfig']['isSymmetricMultiThreadingEnabled'] = platform_config_is_symmetric_multi_threading_enabled
-
- if platform_config_is_access_control_service_enabled is not None:
- _details['platformConfig']['isAccessControlServiceEnabled'] = platform_config_is_access_control_service_enabled
-
- if platform_config_are_virtual_instructions_enabled is not None:
- _details['platformConfig']['areVirtualInstructionsEnabled'] = platform_config_are_virtual_instructions_enabled
-
- if platform_config_is_input_output_memory_management_unit_enabled is not None:
- _details['platformConfig']['isInputOutputMemoryManagementUnitEnabled'] = platform_config_is_input_output_memory_management_unit_enabled
-
- if platform_config_config_map is not None:
- _details['platformConfig']['configMap'] = cli_util.parse_json_parameter("platform_config_config_map", platform_config_config_map)
-
- _details['platformConfig']['type'] = 'AMD_MILAN_BM_GPU'
+ _details['placementConstraintDetails']['type'] = 'HOST_GROUP'
client = cli_util.build_client('core', 'compute', ctx)
result = client.launch_instance(
@@ -8455,7 +9092,7 @@ def launch_instance_amd_milan_bm_gpu_launch_instance_platform_config(ctx, from_j
cli_util.render_response(result, ctx)
-@instance_group.command(name=cli_util.override('compute.launch_instance_host_group_placement_constraint_details.command_name', 'launch-instance-host-group-placement-constraint-details'), help=u"""Creates a new instance in the specified compartment and the specified availability domain. For general information about instances, see [Overview of the Compute Service].
+@instance_group.command(name=cli_util.override('compute.launch_instance_compute_cluster_placement_constraint_details.command_name', 'launch-instance-compute-cluster-placement-constraint-details'), help=u"""Creates a new instance in the specified compartment and the specified availability domain. For general information about instances, see [Overview of the Compute Service].
For information about access control and compartments, see [Overview of the IAM Service].
@@ -8478,7 +9115,6 @@ def launch_instance_amd_milan_bm_gpu_launch_instance_platform_config(ctx, from_j
Example: `Uocm:PHX-AD-1`""")
@cli_util.option('--compartment-id', required=True, help=u"""The OCID of the compartment.""")
-@cli_util.option('--placement-constraint-details-compute-host-group-id', required=True, help=u"""The OCID of the compute host group. This is only available for dedicated capacity customers.""")
@cli_util.option('--capacity-reservation-id', help=u"""The OCID of the compute capacity reservation this instance is launched under. You can opt out of all default reservations by specifying an empty string as input for this field. For more information, see [Capacity Reservations].""")
@cli_util.option('--create-vnic-details', type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
@cli_util.option('--dedicated-vm-host-id', help=u"""The OCID of the dedicated virtual machine host to place the instance on.""")
@@ -8569,15 +9205,29 @@ def launch_instance_amd_milan_bm_gpu_launch_instance_platform_config(ctx, from_j
@cli_util.option('--licensing-configs', type=custom_types.CLI_COMPLEX_TYPE, help=u"""List of licensing configurations associated with target launch values.
This option is a JSON list with items of type LaunchInstanceLicensingConfig. For documentation on LaunchInstanceLicensingConfig please see our API reference: https://docs.oracle.com/en-us/iaas/api/#/en/iaas/20160918/datatypes/LaunchInstanceLicensingConfig.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
+@cli_util.option('--placement-constraint-details-hpc-island-id', help=u"""The [OCID] of the HPC island for the compute cluster.
+
+This field cannot be updated after creation of the compute cluster.""")
+@cli_util.option('--placement-constraint-details-target-network-block-ids', type=custom_types.CLI_COMPLEX_TYPE, help=u"""The list of target network block OCIDs to constrain placement.
+
+If `targetNetworkBlockIds` is provided, the `hpcIslandId` must be set on the compute cluster, and the provided network blocks must belong to that same HPC island.
+
+The ordering of the array will be preserved. Ensure that all items in the array are unique.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
+@cli_util.option('--placement-constraint-details-target-memory-fabric-ids', type=custom_types.CLI_COMPLEX_TYPE, help=u"""The list of target GPU memory fabric OCIDs to constrain placement.
+
+If GMFs are passed in, the `hpcIslandId` must be set on the compute cluster, and the provided GMFs must belong to that same HPC island.
+
+The ordering of the array will be preserved. Ensure that all items in the array are unique.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
+@cli_util.option('--placement-constraint-details-logical-placement-constraint', type=custom_types.CliCaseInsensitiveChoice(["SINGLE_TIER", "SINGLE_BLOCK", "PACKED_DISTRIBUTION_MULTI_BLOCK"]), help=u"""The logical placement strategy to apply. Allowed values are `SINGLE_TIER`, `SINGLE_BLOCK`, and `PACKED_DISTRIBUTION_MULTI_BLOCK`.""")
@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["MOVING", "PROVISIONING", "RUNNING", "STARTING", "STOPPING", "STOPPED", "CREATING_IMAGE", "TERMINATING", "TERMINATED"]), 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 MOVING --wait-for-state TERMINATED 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({'create-vnic-details': {'module': 'core', 'class': 'CreateVnicDetails'}, 'defined-tags': {'module': 'core', 'class': 'dict(str, dict(str, object))'}, 'security-attributes': {'module': 'core', 'class': 'dict(str, dict(str, object))'}, 'extended-metadata': {'module': 'core', 'class': 'dict(str, object)'}, 'freeform-tags': {'module': 'core', 'class': 'dict(str, string)'}, 'launch-options': {'module': 'core', 'class': 'LaunchOptions'}, 'instance-options': {'module': 'core', 'class': 'InstanceOptions'}, 'availability-config': {'module': 'core', 'class': 'LaunchInstanceAvailabilityConfigDetails'}, 'preemptible-instance-config': {'module': 'core', 'class': 'PreemptibleInstanceConfigDetails'}, 'metadata': {'module': 'core', 'class': 'dict(str, string)'}, 'agent-config': {'module': 'core', 'class': 'LaunchInstanceAgentConfigDetails'}, 'shape-config': {'module': 'core', 'class': 'LaunchInstanceShapeConfigDetails'}, 'source-details': {'module': 'core', 'class': 'InstanceSourceDetails'}, 'launch-volume-attachments': {'module': 'core', 'class': 'list[LaunchAttachVolumeDetails]'}, 'platform-config': {'module': 'core', 'class': 'LaunchInstancePlatformConfig'}, 'licensing-configs': {'module': 'core', 'class': 'list[LaunchInstanceLicensingConfig]'}})
+@json_skeleton_utils.get_cli_json_input_option({'create-vnic-details': {'module': 'core', 'class': 'CreateVnicDetails'}, 'defined-tags': {'module': 'core', 'class': 'dict(str, dict(str, object))'}, 'security-attributes': {'module': 'core', 'class': 'dict(str, dict(str, object))'}, 'extended-metadata': {'module': 'core', 'class': 'dict(str, object)'}, 'freeform-tags': {'module': 'core', 'class': 'dict(str, string)'}, 'launch-options': {'module': 'core', 'class': 'LaunchOptions'}, 'instance-options': {'module': 'core', 'class': 'InstanceOptions'}, 'availability-config': {'module': 'core', 'class': 'LaunchInstanceAvailabilityConfigDetails'}, 'preemptible-instance-config': {'module': 'core', 'class': 'PreemptibleInstanceConfigDetails'}, 'metadata': {'module': 'core', 'class': 'dict(str, string)'}, 'agent-config': {'module': 'core', 'class': 'LaunchInstanceAgentConfigDetails'}, 'shape-config': {'module': 'core', 'class': 'LaunchInstanceShapeConfigDetails'}, 'source-details': {'module': 'core', 'class': 'InstanceSourceDetails'}, 'launch-volume-attachments': {'module': 'core', 'class': 'list[LaunchAttachVolumeDetails]'}, 'platform-config': {'module': 'core', 'class': 'LaunchInstancePlatformConfig'}, 'licensing-configs': {'module': 'core', 'class': 'list[LaunchInstanceLicensingConfig]'}, 'placement-constraint-details-target-network-block-ids': {'module': 'core', 'class': 'list[string]'}, 'placement-constraint-details-target-memory-fabric-ids': {'module': 'core', 'class': 'list[string]'}})
@cli_util.help_option
@click.pass_context
-@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'create-vnic-details': {'module': 'core', 'class': 'CreateVnicDetails'}, 'defined-tags': {'module': 'core', 'class': 'dict(str, dict(str, object))'}, 'security-attributes': {'module': 'core', 'class': 'dict(str, dict(str, object))'}, 'extended-metadata': {'module': 'core', 'class': 'dict(str, object)'}, 'freeform-tags': {'module': 'core', 'class': 'dict(str, string)'}, 'launch-options': {'module': 'core', 'class': 'LaunchOptions'}, 'instance-options': {'module': 'core', 'class': 'InstanceOptions'}, 'availability-config': {'module': 'core', 'class': 'LaunchInstanceAvailabilityConfigDetails'}, 'preemptible-instance-config': {'module': 'core', 'class': 'PreemptibleInstanceConfigDetails'}, 'metadata': {'module': 'core', 'class': 'dict(str, string)'}, 'agent-config': {'module': 'core', 'class': 'LaunchInstanceAgentConfigDetails'}, 'shape-config': {'module': 'core', 'class': 'LaunchInstanceShapeConfigDetails'}, 'source-details': {'module': 'core', 'class': 'InstanceSourceDetails'}, 'launch-volume-attachments': {'module': 'core', 'class': 'list[LaunchAttachVolumeDetails]'}, 'platform-config': {'module': 'core', 'class': 'LaunchInstancePlatformConfig'}, 'licensing-configs': {'module': 'core', 'class': 'list[LaunchInstanceLicensingConfig]'}}, output_type={'module': 'core', 'class': 'Instance'})
+@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'create-vnic-details': {'module': 'core', 'class': 'CreateVnicDetails'}, 'defined-tags': {'module': 'core', 'class': 'dict(str, dict(str, object))'}, 'security-attributes': {'module': 'core', 'class': 'dict(str, dict(str, object))'}, 'extended-metadata': {'module': 'core', 'class': 'dict(str, object)'}, 'freeform-tags': {'module': 'core', 'class': 'dict(str, string)'}, 'launch-options': {'module': 'core', 'class': 'LaunchOptions'}, 'instance-options': {'module': 'core', 'class': 'InstanceOptions'}, 'availability-config': {'module': 'core', 'class': 'LaunchInstanceAvailabilityConfigDetails'}, 'preemptible-instance-config': {'module': 'core', 'class': 'PreemptibleInstanceConfigDetails'}, 'metadata': {'module': 'core', 'class': 'dict(str, string)'}, 'agent-config': {'module': 'core', 'class': 'LaunchInstanceAgentConfigDetails'}, 'shape-config': {'module': 'core', 'class': 'LaunchInstanceShapeConfigDetails'}, 'source-details': {'module': 'core', 'class': 'InstanceSourceDetails'}, 'launch-volume-attachments': {'module': 'core', 'class': 'list[LaunchAttachVolumeDetails]'}, 'platform-config': {'module': 'core', 'class': 'LaunchInstancePlatformConfig'}, 'licensing-configs': {'module': 'core', 'class': 'list[LaunchInstanceLicensingConfig]'}, 'placement-constraint-details-target-network-block-ids': {'module': 'core', 'class': 'list[string]'}, 'placement-constraint-details-target-memory-fabric-ids': {'module': 'core', 'class': 'list[string]'}}, output_type={'module': 'core', 'class': 'Instance'})
@cli_util.wrap_exceptions
-def launch_instance_host_group_placement_constraint_details(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, availability_domain, compartment_id, placement_constraint_details_compute_host_group_id, capacity_reservation_id, create_vnic_details, dedicated_vm_host_id, defined_tags, security_attributes, display_name, extended_metadata, fault_domain, cluster_placement_group_id, freeform_tags, compute_cluster_id, hostname_label, image_id, ipxe_script_file, launch_options, instance_options, availability_config, preemptible_instance_config, metadata, agent_config, shape, shape_config, source_details, subnet_id, launch_volume_attachments, is_pv_encryption_in_transit_enabled, platform_config, is_ai_enterprise_enabled, instance_configuration_id, licensing_configs):
+def launch_instance_compute_cluster_placement_constraint_details(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, availability_domain, compartment_id, capacity_reservation_id, create_vnic_details, dedicated_vm_host_id, defined_tags, security_attributes, display_name, extended_metadata, fault_domain, cluster_placement_group_id, freeform_tags, compute_cluster_id, hostname_label, image_id, ipxe_script_file, launch_options, instance_options, availability_config, preemptible_instance_config, metadata, agent_config, shape, shape_config, source_details, subnet_id, launch_volume_attachments, is_pv_encryption_in_transit_enabled, platform_config, is_ai_enterprise_enabled, instance_configuration_id, licensing_configs, placement_constraint_details_hpc_island_id, placement_constraint_details_target_network_block_ids, placement_constraint_details_target_memory_fabric_ids, placement_constraint_details_logical_placement_constraint):
kwargs = {}
@@ -8585,7 +9235,6 @@ def launch_instance_host_group_placement_constraint_details(ctx, from_json, wait
_details['placementConstraintDetails'] = {}
_details['availabilityDomain'] = availability_domain
_details['compartmentId'] = compartment_id
- _details['placementConstraintDetails']['computeHostGroupId'] = placement_constraint_details_compute_host_group_id
if capacity_reservation_id is not None:
_details['capacityReservationId'] = capacity_reservation_id
@@ -8677,7 +9326,19 @@ def launch_instance_host_group_placement_constraint_details(ctx, from_json, wait
if licensing_configs is not None:
_details['licensingConfigs'] = cli_util.parse_json_parameter("licensing_configs", licensing_configs)
- _details['placementConstraintDetails']['type'] = 'HOST_GROUP'
+ if placement_constraint_details_hpc_island_id is not None:
+ _details['placementConstraintDetails']['hpcIslandId'] = placement_constraint_details_hpc_island_id
+
+ if placement_constraint_details_target_network_block_ids is not None:
+ _details['placementConstraintDetails']['targetNetworkBlockIds'] = cli_util.parse_json_parameter("placement_constraint_details_target_network_block_ids", placement_constraint_details_target_network_block_ids)
+
+ if placement_constraint_details_target_memory_fabric_ids is not None:
+ _details['placementConstraintDetails']['targetMemoryFabricIds'] = cli_util.parse_json_parameter("placement_constraint_details_target_memory_fabric_ids", placement_constraint_details_target_memory_fabric_ids)
+
+ if placement_constraint_details_logical_placement_constraint is not None:
+ _details['placementConstraintDetails']['logicalPlacementConstraint'] = placement_constraint_details_logical_placement_constraint
+
+ _details['placementConstraintDetails']['type'] = 'COMPUTE_CLUSTER'
client = cli_util.build_client('core', 'compute', ctx)
result = client.launch_instance(
@@ -11700,6 +12361,285 @@ def update_compute_capacity_topology_update_dedicated_capacity_source_details(ct
Example: `{\"Operations\": {\"CostCenter\": \"42\"}}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
@cli_util.option('--freeform-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags].
+Example: `{\"Department\": \"Finance\"}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
+@cli_util.option('--placement-constraint-details', type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
+@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('--force', help="""Perform update without prompting for confirmation.""", is_flag=True)
+@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACTIVE", "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 ACTIVE --wait-for-state DELETED 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({'defined-tags': {'module': 'core', 'class': 'dict(str, dict(str, object))'}, 'freeform-tags': {'module': 'core', 'class': 'dict(str, string)'}, 'placement-constraint-details': {'module': 'core', 'class': 'PlacementConstraintDetails'}})
+@cli_util.help_option
+@click.pass_context
+@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'defined-tags': {'module': 'core', 'class': 'dict(str, dict(str, object))'}, 'freeform-tags': {'module': 'core', 'class': 'dict(str, string)'}, 'placement-constraint-details': {'module': 'core', 'class': 'PlacementConstraintDetails'}}, output_type={'module': 'core', 'class': 'ComputeCluster'})
+@cli_util.wrap_exceptions
+def update_compute_cluster(ctx, from_json, force, wait_for_state, max_wait_seconds, wait_interval_seconds, compute_cluster_id, display_name, defined_tags, freeform_tags, placement_constraint_details, if_match):
+
+ if isinstance(compute_cluster_id, six.string_types) and len(compute_cluster_id.strip()) == 0:
+ raise click.UsageError('Parameter --compute-cluster-id cannot be whitespace or empty string')
+ if not force:
+ if defined_tags or freeform_tags or placement_constraint_details:
+ if not click.confirm("WARNING: Updates to defined-tags and freeform-tags and placement-constraint-details will replace any existing values. Are you sure you want to continue?"):
+ ctx.abort()
+
+ 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 defined_tags is not None:
+ _details['definedTags'] = cli_util.parse_json_parameter("defined_tags", defined_tags)
+
+ if freeform_tags is not None:
+ _details['freeformTags'] = cli_util.parse_json_parameter("freeform_tags", freeform_tags)
+
+ if placement_constraint_details is not None:
+ _details['placementConstraintDetails'] = cli_util.parse_json_parameter("placement_constraint_details", placement_constraint_details)
+
+ client = cli_util.build_client('core', 'compute', ctx)
+ result = client.update_compute_cluster(
+ compute_cluster_id=compute_cluster_id,
+ update_compute_cluster_details=_details,
+ **kwargs
+ )
+ if wait_for_state:
+
+ if hasattr(client, 'get_compute_cluster') and callable(getattr(client, 'get_compute_cluster')):
+ 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_compute_cluster(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)
+
+
+@compute_cluster_group.command(name=cli_util.override('compute.update_compute_cluster_host_group_placement_constraint_details.command_name', 'update-compute-cluster-host-group-placement-constraint-details'), help=u"""Updates a compute cluster. A [compute cluster] is a remote direct memory access (RDMA) network group.
+
+To create instances within a compute cluster, use the [LaunchInstance] operation.
+
+To delete instances from a compute cluster, use the [TerminateInstance] operation. \n[Command Reference](updateComputeCluster)""")
+@cli_util.option('--compute-cluster-id', required=True, help=u"""The [OCID] of the compute cluster. A [compute cluster] is a remote direct memory access (RDMA) network group.""")
+@cli_util.option('--placement-constraint-details-compute-host-group-id', required=True, help=u"""The OCID of the compute host group. This is only available for dedicated capacity customers.""")
+@cli_util.option('--display-name', help=u"""A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.""")
+@cli_util.option('--defined-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags].
+
+Example: `{\"Operations\": {\"CostCenter\": \"42\"}}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
+@cli_util.option('--freeform-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags].
+
+Example: `{\"Department\": \"Finance\"}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
+@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('--force', help="""Perform update without prompting for confirmation.""", is_flag=True)
+@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACTIVE", "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 ACTIVE --wait-for-state DELETED 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({'defined-tags': {'module': 'core', 'class': 'dict(str, dict(str, object))'}, 'freeform-tags': {'module': 'core', 'class': 'dict(str, string)'}})
+@cli_util.help_option
+@click.pass_context
+@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'defined-tags': {'module': 'core', 'class': 'dict(str, dict(str, object))'}, 'freeform-tags': {'module': 'core', 'class': 'dict(str, string)'}}, output_type={'module': 'core', 'class': 'ComputeCluster'})
+@cli_util.wrap_exceptions
+def update_compute_cluster_host_group_placement_constraint_details(ctx, from_json, force, wait_for_state, max_wait_seconds, wait_interval_seconds, compute_cluster_id, placement_constraint_details_compute_host_group_id, display_name, defined_tags, freeform_tags, if_match):
+
+ if isinstance(compute_cluster_id, six.string_types) and len(compute_cluster_id.strip()) == 0:
+ raise click.UsageError('Parameter --compute-cluster-id cannot be whitespace or empty string')
+ if not force:
+ if defined_tags or freeform_tags:
+ if not click.confirm("WARNING: Updates to defined-tags and freeform-tags will replace any existing values. Are you sure you want to continue?"):
+ ctx.abort()
+
+ 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['placementConstraintDetails'] = {}
+ _details['placementConstraintDetails']['computeHostGroupId'] = placement_constraint_details_compute_host_group_id
+
+ if display_name is not None:
+ _details['displayName'] = display_name
+
+ if defined_tags is not None:
+ _details['definedTags'] = cli_util.parse_json_parameter("defined_tags", defined_tags)
+
+ if freeform_tags is not None:
+ _details['freeformTags'] = cli_util.parse_json_parameter("freeform_tags", freeform_tags)
+
+ _details['placementConstraintDetails']['type'] = 'HOST_GROUP'
+
+ client = cli_util.build_client('core', 'compute', ctx)
+ result = client.update_compute_cluster(
+ compute_cluster_id=compute_cluster_id,
+ update_compute_cluster_details=_details,
+ **kwargs
+ )
+ if wait_for_state:
+
+ if hasattr(client, 'get_compute_cluster') and callable(getattr(client, 'get_compute_cluster')):
+ 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_compute_cluster(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)
+
+
+@compute_cluster_group.command(name=cli_util.override('compute.update_compute_cluster_compute_cluster_placement_constraint_details.command_name', 'update-compute-cluster-compute-cluster-placement-constraint-details'), help=u"""Updates a compute cluster. A [compute cluster] is a remote direct memory access (RDMA) network group.
+
+To create instances within a compute cluster, use the [LaunchInstance] operation.
+
+To delete instances from a compute cluster, use the [TerminateInstance] operation. \n[Command Reference](updateComputeCluster)""")
+@cli_util.option('--compute-cluster-id', required=True, help=u"""The [OCID] of the compute cluster. A [compute cluster] is a remote direct memory access (RDMA) network group.""")
+@cli_util.option('--display-name', help=u"""A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.""")
+@cli_util.option('--defined-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags].
+
+Example: `{\"Operations\": {\"CostCenter\": \"42\"}}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
+@cli_util.option('--freeform-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags].
+
+Example: `{\"Department\": \"Finance\"}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
+@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('--placement-constraint-details-hpc-island-id', help=u"""The [OCID] of the HPC island for the compute cluster.
+
+This field cannot be updated after creation of the compute cluster.""")
+@cli_util.option('--placement-constraint-details-target-network-block-ids', type=custom_types.CLI_COMPLEX_TYPE, help=u"""The list of target network block OCIDs to constrain placement.
+
+If `targetNetworkBlockIds` is provided, the `hpcIslandId` must be set on the compute cluster, and the provided network blocks must belong to that same HPC island.
+
+The ordering of the array will be preserved. Ensure that all items in the array are unique.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
+@cli_util.option('--placement-constraint-details-target-memory-fabric-ids', type=custom_types.CLI_COMPLEX_TYPE, help=u"""The list of target GPU memory fabric OCIDs to constrain placement.
+
+If GMFs are passed in, the `hpcIslandId` must be set on the compute cluster, and the provided GMFs must belong to that same HPC island.
+
+The ordering of the array will be preserved. Ensure that all items in the array are unique.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
+@cli_util.option('--placement-constraint-details-logical-placement-constraint', type=custom_types.CliCaseInsensitiveChoice(["SINGLE_TIER", "SINGLE_BLOCK", "PACKED_DISTRIBUTION_MULTI_BLOCK"]), help=u"""The logical placement strategy to apply. Allowed values are `SINGLE_TIER`, `SINGLE_BLOCK`, and `PACKED_DISTRIBUTION_MULTI_BLOCK`.""")
+@cli_util.option('--force', help="""Perform update without prompting for confirmation.""", is_flag=True)
+@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACTIVE", "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 ACTIVE --wait-for-state DELETED 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({'defined-tags': {'module': 'core', 'class': 'dict(str, dict(str, object))'}, 'freeform-tags': {'module': 'core', 'class': 'dict(str, string)'}, 'placement-constraint-details-target-network-block-ids': {'module': 'core', 'class': 'list[string]'}, 'placement-constraint-details-target-memory-fabric-ids': {'module': 'core', 'class': 'list[string]'}})
+@cli_util.help_option
+@click.pass_context
+@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'defined-tags': {'module': 'core', 'class': 'dict(str, dict(str, object))'}, 'freeform-tags': {'module': 'core', 'class': 'dict(str, string)'}, 'placement-constraint-details-target-network-block-ids': {'module': 'core', 'class': 'list[string]'}, 'placement-constraint-details-target-memory-fabric-ids': {'module': 'core', 'class': 'list[string]'}}, output_type={'module': 'core', 'class': 'ComputeCluster'})
+@cli_util.wrap_exceptions
+def update_compute_cluster_compute_cluster_placement_constraint_details(ctx, from_json, force, wait_for_state, max_wait_seconds, wait_interval_seconds, compute_cluster_id, display_name, defined_tags, freeform_tags, if_match, placement_constraint_details_hpc_island_id, placement_constraint_details_target_network_block_ids, placement_constraint_details_target_memory_fabric_ids, placement_constraint_details_logical_placement_constraint):
+
+ if isinstance(compute_cluster_id, six.string_types) and len(compute_cluster_id.strip()) == 0:
+ raise click.UsageError('Parameter --compute-cluster-id cannot be whitespace or empty string')
+ if not force:
+ if defined_tags or freeform_tags:
+ if not click.confirm("WARNING: Updates to defined-tags and freeform-tags will replace any existing values. Are you sure you want to continue?"):
+ ctx.abort()
+
+ 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['placementConstraintDetails'] = {}
+
+ if display_name is not None:
+ _details['displayName'] = display_name
+
+ if defined_tags is not None:
+ _details['definedTags'] = cli_util.parse_json_parameter("defined_tags", defined_tags)
+
+ if freeform_tags is not None:
+ _details['freeformTags'] = cli_util.parse_json_parameter("freeform_tags", freeform_tags)
+
+ if placement_constraint_details_hpc_island_id is not None:
+ _details['placementConstraintDetails']['hpcIslandId'] = placement_constraint_details_hpc_island_id
+
+ if placement_constraint_details_target_network_block_ids is not None:
+ _details['placementConstraintDetails']['targetNetworkBlockIds'] = cli_util.parse_json_parameter("placement_constraint_details_target_network_block_ids", placement_constraint_details_target_network_block_ids)
+
+ if placement_constraint_details_target_memory_fabric_ids is not None:
+ _details['placementConstraintDetails']['targetMemoryFabricIds'] = cli_util.parse_json_parameter("placement_constraint_details_target_memory_fabric_ids", placement_constraint_details_target_memory_fabric_ids)
+
+ if placement_constraint_details_logical_placement_constraint is not None:
+ _details['placementConstraintDetails']['logicalPlacementConstraint'] = placement_constraint_details_logical_placement_constraint
+
+ _details['placementConstraintDetails']['type'] = 'COMPUTE_CLUSTER'
+
+ client = cli_util.build_client('core', 'compute', ctx)
+ result = client.update_compute_cluster(
+ compute_cluster_id=compute_cluster_id,
+ update_compute_cluster_details=_details,
+ **kwargs
+ )
+ if wait_for_state:
+
+ if hasattr(client, 'get_compute_cluster') and callable(getattr(client, 'get_compute_cluster')):
+ 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_compute_cluster(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)
+
+
+@compute_cluster_group.command(name=cli_util.override('compute.update_compute_cluster_compute_bare_metal_host_placement_constraint_details.command_name', 'update-compute-cluster-compute-bare-metal-host-placement-constraint-details'), help=u"""Updates a compute cluster. A [compute cluster] is a remote direct memory access (RDMA) network group.
+
+To create instances within a compute cluster, use the [LaunchInstance] operation.
+
+To delete instances from a compute cluster, use the [TerminateInstance] operation. \n[Command Reference](updateComputeCluster)""")
+@cli_util.option('--compute-cluster-id', required=True, help=u"""The [OCID] of the compute cluster. A [compute cluster] is a remote direct memory access (RDMA) network group.""")
+@cli_util.option('--placement-constraint-details-compute-bare-metal-host-id', required=True, help=u"""The OCID of the compute bare metal host. This is only available for dedicated capacity customers.""")
+@cli_util.option('--display-name', help=u"""A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.""")
+@cli_util.option('--defined-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags].
+
+Example: `{\"Operations\": {\"CostCenter\": \"42\"}}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
+@cli_util.option('--freeform-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags].
+
Example: `{\"Department\": \"Finance\"}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
@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('--force', help="""Perform update without prompting for confirmation.""", is_flag=True)
@@ -11711,7 +12651,7 @@ def update_compute_capacity_topology_update_dedicated_capacity_source_details(ct
@click.pass_context
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'defined-tags': {'module': 'core', 'class': 'dict(str, dict(str, object))'}, 'freeform-tags': {'module': 'core', 'class': 'dict(str, string)'}}, output_type={'module': 'core', 'class': 'ComputeCluster'})
@cli_util.wrap_exceptions
-def update_compute_cluster(ctx, from_json, force, wait_for_state, max_wait_seconds, wait_interval_seconds, compute_cluster_id, display_name, defined_tags, freeform_tags, if_match):
+def update_compute_cluster_compute_bare_metal_host_placement_constraint_details(ctx, from_json, force, wait_for_state, max_wait_seconds, wait_interval_seconds, compute_cluster_id, placement_constraint_details_compute_bare_metal_host_id, display_name, defined_tags, freeform_tags, if_match):
if isinstance(compute_cluster_id, six.string_types) and len(compute_cluster_id.strip()) == 0:
raise click.UsageError('Parameter --compute-cluster-id cannot be whitespace or empty string')
@@ -11726,6 +12666,8 @@ def update_compute_cluster(ctx, from_json, force, wait_for_state, max_wait_secon
kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
_details = {}
+ _details['placementConstraintDetails'] = {}
+ _details['placementConstraintDetails']['computeBareMetalHostId'] = placement_constraint_details_compute_bare_metal_host_id
if display_name is not None:
_details['displayName'] = display_name
@@ -11736,6 +12678,8 @@ def update_compute_cluster(ctx, from_json, force, wait_for_state, max_wait_secon
if freeform_tags is not None:
_details['freeformTags'] = cli_util.parse_json_parameter("freeform_tags", freeform_tags)
+ _details['placementConstraintDetails']['type'] = 'COMPUTE_BARE_METAL_HOST'
+
client = cli_util.build_client('core', 'compute', ctx)
result = client.update_compute_cluster(
compute_cluster_id=compute_cluster_id,
diff --git a/services/core/src/oci_cli_compute_management/generated/computemanagement_cli.py b/services/core/src/oci_cli_compute_management/generated/computemanagement_cli.py
index 2f5eb0b9f..846772ec3 100644
--- a/services/core/src/oci_cli_compute_management/generated/computemanagement_cli.py
+++ b/services/core/src/oci_cli_compute_management/generated/computemanagement_cli.py
@@ -48,7 +48,7 @@ def instance_group():
pass
-@click.command(cli_util.override('compute_management.instance_configuration_group.command_name', 'instance-configuration'), cls=CommandGroupWithAlias, help="""An instance configuration is a template that defines the settings to use when creating Compute instances.""")
+@click.command(cli_util.override('compute_management.instance_configuration_group.command_name', 'instance-configuration'), cls=CommandGroupWithAlias, help="""An instance configuration is a template that defines the settings to use when creating Compute instances. An instance configuration is a template that defines the settings to use when creating Compute instances or GPU Memory Clusters. For more information about instance configurations, see [Managing Compute Instances].""")
@cli_util.help_option_group
def instance_configuration_group():
pass
@@ -381,7 +381,7 @@ def create_cluster_network(ctx, from_json, wait_for_state, max_wait_seconds, wai
cli_util.render_response(result, ctx)
-@instance_configuration_group.command(name=cli_util.override('compute_management.create_instance_configuration.command_name', 'create'), help=u"""Creates an instance configuration. An instance configuration is a template that defines the settings to use when creating Compute instances. \n[Command Reference](createInstanceConfiguration)""")
+@instance_configuration_group.command(name=cli_util.override('compute_management.create_instance_configuration.command_name', 'create'), help=u"""Creates an instance configuration. An instance configuration is a template that defines the settings to use when creating Compute instances or GPU Memory Clusters. \n[Command Reference](createInstanceConfiguration)""")
@cli_util.option('--compartment-id', required=True, help=u"""The [OCID] of the compartment containing the instance configuration.""")
@cli_util.option('--defined-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags].
@@ -390,7 +390,7 @@ def create_cluster_network(ctx, from_json, wait_for_state, max_wait_seconds, wai
@cli_util.option('--freeform-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags].
Example: `{\"Department\": \"Finance\"}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
-@cli_util.option('--source', type=custom_types.CliCaseInsensitiveChoice(["NONE", "INSTANCE"]), help=u"""The source of the instance configuration. An instance configuration defines the settings to use when creating Compute instances, including details such as the base image, shape, and metadata. You can also specify the associated resources for the instance, such as block volume attachments and network configuration.
+@cli_util.option('--source', type=custom_types.CliCaseInsensitiveChoice(["NONE", "INSTANCE", "GMC"]), help=u"""The source of the instance configuration. An instance configuration defines the settings to use when creating Compute instances, including details such as the base image, shape, and metadata. You can also specify the associated resources for the instance, such as block volume attachments and network configuration.
When you create an instance configuration using an existing instance as a template, the instance configuration does not include any information from the source instance's boot volume, such as installed applications, binaries, and files on the instance. It also does not include the contents of any block volumes that are attached to the instance.
@@ -400,7 +400,7 @@ def create_cluster_network(ctx, from_json, wait_for_state, max_wait_seconds, wai
The following values are supported:
-* `NONE`: Creates an instance configuration using the list of settings that you specify. * `INSTANCE`: Creates an instance configuration using an existing instance as a template.""")
+* `NONE`: Creates an instance configuration using the list of settings that you specify. * `INSTANCE`: Creates an instance configuration using an existing instance as a template. * `GMC`: Creates an instance configuration which can be used to create GMC backed pools.""")
@json_skeleton_utils.get_cli_json_input_option({'defined-tags': {'module': 'core', 'class': 'dict(str, dict(str, object))'}, 'freeform-tags': {'module': 'core', 'class': 'dict(str, string)'}})
@cli_util.help_option
@click.pass_context
@@ -433,7 +433,49 @@ def create_instance_configuration(ctx, from_json, compartment_id, defined_tags,
cli_util.render_response(result, ctx)
-@instance_configuration_group.command(name=cli_util.override('compute_management.create_instance_configuration_create_instance_configuration_details.command_name', 'create-instance-configuration-create-instance-configuration-details'), help=u"""Creates an instance configuration. An instance configuration is a template that defines the settings to use when creating Compute instances. \n[Command Reference](createInstanceConfiguration)""")
+@instance_configuration_group.command(name=cli_util.override('compute_management.create_instance_configuration_create_gmc_configuration_details.command_name', 'create-instance-configuration-create-gmc-configuration-details'), help=u"""Creates an instance configuration. An instance configuration is a template that defines the settings to use when creating Compute instances or GPU Memory Clusters. \n[Command Reference](createInstanceConfiguration)""")
+@cli_util.option('--compartment-id', required=True, help=u"""The [OCID] of the compartment containing the instance configuration.""")
+@cli_util.option('--gmc-configs', required=True, type=custom_types.CLI_COMPLEX_TYPE, help=u"""The GPU Memory Cluster configuration entries for.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
+@cli_util.option('--defined-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags].
+
+Example: `{\"Operations\": {\"CostCenter\": \"42\"}}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
+@cli_util.option('--display-name', help=u"""A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.""")
+@cli_util.option('--freeform-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags].
+
+Example: `{\"Department\": \"Finance\"}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
+@json_skeleton_utils.get_cli_json_input_option({'defined-tags': {'module': 'core', 'class': 'dict(str, dict(str, object))'}, 'freeform-tags': {'module': 'core', 'class': 'dict(str, string)'}, 'gmc-configs': {'module': 'core', 'class': 'list[InstanceConfigurationGmcConfigDetail]'}})
+@cli_util.help_option
+@click.pass_context
+@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'defined-tags': {'module': 'core', 'class': 'dict(str, dict(str, object))'}, 'freeform-tags': {'module': 'core', 'class': 'dict(str, string)'}, 'gmc-configs': {'module': 'core', 'class': 'list[InstanceConfigurationGmcConfigDetail]'}}, output_type={'module': 'core', 'class': 'InstanceConfiguration'})
+@cli_util.wrap_exceptions
+def create_instance_configuration_create_gmc_configuration_details(ctx, from_json, compartment_id, gmc_configs, defined_tags, display_name, freeform_tags):
+
+ kwargs = {}
+
+ _details = {}
+ _details['compartmentId'] = compartment_id
+ _details['gmcConfigs'] = cli_util.parse_json_parameter("gmc_configs", gmc_configs)
+
+ if defined_tags is not None:
+ _details['definedTags'] = cli_util.parse_json_parameter("defined_tags", defined_tags)
+
+ if display_name is not None:
+ _details['displayName'] = display_name
+
+ if freeform_tags is not None:
+ _details['freeformTags'] = cli_util.parse_json_parameter("freeform_tags", freeform_tags)
+
+ _details['source'] = 'GMC'
+
+ client = cli_util.build_client('core', 'compute_management', ctx)
+ result = client.create_instance_configuration(
+ create_instance_configuration=_details,
+ **kwargs
+ )
+ cli_util.render_response(result, ctx)
+
+
+@instance_configuration_group.command(name=cli_util.override('compute_management.create_instance_configuration_create_instance_configuration_details.command_name', 'create-instance-configuration-create-instance-configuration-details'), help=u"""Creates an instance configuration. An instance configuration is a template that defines the settings to use when creating Compute instances or GPU Memory Clusters. \n[Command Reference](createInstanceConfiguration)""")
@cli_util.option('--compartment-id', required=True, help=u"""The [OCID] of the compartment containing the instance configuration.""")
@cli_util.option('--instance-details', required=True, type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
@cli_util.option('--defined-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags].
@@ -475,7 +517,7 @@ def create_instance_configuration_create_instance_configuration_details(ctx, fro
cli_util.render_response(result, ctx)
-@instance_configuration_group.command(name=cli_util.override('compute_management.create_instance_configuration_create_instance_configuration_from_instance_details.command_name', 'create-instance-configuration-create-instance-configuration-from-instance-details'), help=u"""Creates an instance configuration. An instance configuration is a template that defines the settings to use when creating Compute instances. \n[Command Reference](createInstanceConfiguration)""")
+@instance_configuration_group.command(name=cli_util.override('compute_management.create_instance_configuration_create_instance_configuration_from_instance_details.command_name', 'create-instance-configuration-create-instance-configuration-from-instance-details'), help=u"""Creates an instance configuration. An instance configuration is a template that defines the settings to use when creating Compute instances or GPU Memory Clusters. \n[Command Reference](createInstanceConfiguration)""")
@cli_util.option('--compartment-id', required=True, help=u"""The [OCID] of the compartment containing the instance configuration.""")
@cli_util.option('--instance-id', required=True, help=u"""The [OCID] of the instance to use to create the instance configuration.""")
@cli_util.option('--defined-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags].
@@ -525,7 +567,7 @@ def create_instance_configuration_create_instance_configuration_from_instance_de
@cli_util.option('--placement-configurations', required=True, type=custom_types.CLI_COMPLEX_TYPE, help=u"""The placement configurations for the instance pool. Provide one placement configuration for each availability domain.
To use the instance pool with a regional subnet, provide a placement configuration for each availability domain, and include the regional subnet in each placement configuration. To use compute cluster with instance pool, provide a single placement configuration.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
-@cli_util.option('--size', required=True, type=click.INT, help=u"""The number of instances that should be in the instance pool.""")
+@cli_util.option('--size', required=True, type=click.INT, help=u"""The number of instances that should be in the instance pool. For a GMC-enabled resource pool, this is the number of GMC resources that should be in the pool.""")
@cli_util.option('--defined-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags].
Example: `{\"Operations\": {\"CostCenter\": \"42\"}}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
@@ -1874,7 +1916,7 @@ def update_instance_configuration(ctx, from_json, force, instance_configuration_
To use the instance pool with a regional subnet, provide a placement configuration for each availability domain, and include the regional subnet in each placement configuration.
This option is a JSON list with items of type UpdateInstancePoolPlacementConfigurationDetails. For documentation on UpdateInstancePoolPlacementConfigurationDetails please see our API reference: https://docs.oracle.com/en-us/iaas/api/#/en/iaas/20160918/datatypes/UpdateInstancePoolPlacementConfigurationDetails.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
-@cli_util.option('--size', type=click.INT, help=u"""The number of instances that should be in the instance pool.
+@cli_util.option('--size', type=click.INT, help=u"""The number of instances that should be in the instance pool. For a GMC-enabled resource pool, this is the number of GMC resources that should be in the pool.
To determine whether capacity is available for a specific shape before you resize an instance pool, use the [CreateComputeCapacityReport] operation.""")
@cli_util.option('--instance-display-name-formatter', help=u"""A user-friendly formatter for the instance pool's instances. Instance displaynames follow the format. The formatter does not retroactively change instance's displaynames, only instance displaynames in the future follow the format""")
diff --git a/services/data_safe/src/oci_cli_data_safe/generated/datasafe_cli.py b/services/data_safe/src/oci_cli_data_safe/generated/datasafe_cli.py
index 2e7203c59..57ad9a718 100644
--- a/services/data_safe/src/oci_cli_data_safe/generated/datasafe_cli.py
+++ b/services/data_safe/src/oci_cli_data_safe/generated/datasafe_cli.py
@@ -3832,15 +3832,16 @@ def create_audit_profile(ctx, from_json, wait_for_state, max_wait_seconds, wait_
Example: `{\"Department\": \"Finance\"}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
@cli_util.option('--defined-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags] Example: `{\"Operations\": {\"CostCenter\": \"42\"}}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
+@cli_util.option('--security-attributes', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Security attributes for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags]. Example: `{\"Oracle-ZPR\": {\"MaxEgressCount\": {\"value\": \"42\", \"mode\": \"enforce\"}}}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED", "SUSPENDING", "SUSPENDED"]), 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 ACCEPTED --wait-for-state SUSPENDED 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({'nsg-ids': {'module': 'data_safe', 'class': 'list[string]'}, 'freeform-tags': {'module': 'data_safe', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'data_safe', 'class': 'dict(str, dict(str, object))'}})
+@json_skeleton_utils.get_cli_json_input_option({'nsg-ids': {'module': 'data_safe', 'class': 'list[string]'}, 'freeform-tags': {'module': 'data_safe', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'data_safe', 'class': 'dict(str, dict(str, object))'}, 'security-attributes': {'module': 'data_safe', 'class': 'dict(str, dict(str, object))'}})
@cli_util.help_option
@click.pass_context
-@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'nsg-ids': {'module': 'data_safe', 'class': 'list[string]'}, 'freeform-tags': {'module': 'data_safe', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'data_safe', 'class': 'dict(str, dict(str, object))'}}, output_type={'module': 'data_safe', 'class': 'DataSafePrivateEndpoint'})
+@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'nsg-ids': {'module': 'data_safe', 'class': 'list[string]'}, 'freeform-tags': {'module': 'data_safe', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'data_safe', 'class': 'dict(str, dict(str, object))'}, 'security-attributes': {'module': 'data_safe', 'class': 'dict(str, dict(str, object))'}}, output_type={'module': 'data_safe', 'class': 'DataSafePrivateEndpoint'})
@cli_util.wrap_exceptions
-def create_data_safe_private_endpoint(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, display_name, compartment_id, vcn_id, subnet_id, private_endpoint_ip, description, nsg_ids, freeform_tags, defined_tags):
+def create_data_safe_private_endpoint(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, display_name, compartment_id, vcn_id, subnet_id, private_endpoint_ip, description, nsg_ids, freeform_tags, defined_tags, security_attributes):
kwargs = {}
kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
@@ -3866,6 +3867,9 @@ def create_data_safe_private_endpoint(ctx, from_json, wait_for_state, max_wait_s
if defined_tags is not None:
_details['definedTags'] = cli_util.parse_json_parameter("defined_tags", defined_tags)
+ if security_attributes is not None:
+ _details['securityAttributes'] = cli_util.parse_json_parameter("security_attributes", security_attributes)
+
client = cli_util.build_client('data_safe', 'data_safe', ctx)
result = client.create_data_safe_private_endpoint(
create_data_safe_private_endpoint_details=_details,
@@ -5140,7 +5144,7 @@ def create_sdm_masking_policy_difference(ctx, from_json, wait_for_state, max_wai
cli_util.render_response(result, ctx)
-@security_assessment_group.command(name=cli_util.override('data_safe.create_security_assessment.command_name', 'create'), help=u"""Creates a new saved security assessment for one or multiple targets in a compartment. When this operation is performed, it will save the latest assessments in the specified compartment. If a schedule is passed, it will persist the latest assessments, at the defined date and time, in the format defined by [RFC3339]. \n[Command Reference](createSecurityAssessment)""")
+@security_assessment_group.command(name=cli_util.override('data_safe.create_security_assessment.command_name', 'create'), help=u"""Creates a new saved security assessment for a target database or target database group in a compartment. When this operation is performed, it will save the latest assessment in the specified compartment. If a schedule is passed, it will persist the latest assessment, at the defined date and time, in the format defined by [RFC3339]. \n[Command Reference](createSecurityAssessment)""")
@cli_util.option('--compartment-id', required=True, help=u"""The OCID of the compartment that contains the security assessment.""")
@cli_util.option('--display-name', help=u"""The display name of the security assessment.""")
@cli_util.option('--description', help=u"""Description of the security assessment.""")
@@ -6177,11 +6181,12 @@ def create_sql_collection(ctx, from_json, wait_for_state, max_wait_seconds, wait
@target_alert_policy_association_group.command(name=cli_util.override('data_safe.create_target_alert_policy_association.command_name', 'create'), help=u"""Creates a new target-alert policy association to track a alert policy applied on target. \n[Command Reference](createTargetAlertPolicyAssociation)""")
@cli_util.option('--policy-id', required=True, help=u"""The OCID of the alert policy.""")
-@cli_util.option('--target-id', required=True, help=u"""The OCID of the target.""")
+@cli_util.option('--target-id', required=True, help=u"""The OCID of the target or target database group.""")
@cli_util.option('--compartment-id', required=True, help=u"""The OCID of the compartment where the target-alert policy association is created.""")
@cli_util.option('--is-enabled', required=True, type=click.BOOL, help=u"""Indicates if the target-alert policy association is enabled or disabled by user.""")
@cli_util.option('--display-name', help=u"""The display name of the target-alert policy association.""")
@cli_util.option('--description', help=u"""Describes the target-alert policy association.""")
+@cli_util.option('--target-type', help=u"""The resource type that is represented by the alert policy association. Default is considered as TARGET_DATABASE.""")
@cli_util.option('--freeform-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags]
Example: `{\"Department\": \"Finance\"}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
@@ -6194,7 +6199,7 @@ def create_sql_collection(ctx, from_json, wait_for_state, max_wait_seconds, wait
@click.pass_context
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'freeform-tags': {'module': 'data_safe', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'data_safe', 'class': 'dict(str, dict(str, object))'}}, output_type={'module': 'data_safe', 'class': 'TargetAlertPolicyAssociation'})
@cli_util.wrap_exceptions
-def create_target_alert_policy_association(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, policy_id, target_id, compartment_id, is_enabled, display_name, description, freeform_tags, defined_tags):
+def create_target_alert_policy_association(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, policy_id, target_id, compartment_id, is_enabled, display_name, description, target_type, freeform_tags, defined_tags):
kwargs = {}
kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
@@ -6211,6 +6216,9 @@ def create_target_alert_policy_association(ctx, from_json, wait_for_state, max_w
if description is not None:
_details['description'] = description
+ if target_type is not None:
+ _details['targetType'] = target_type
+
if freeform_tags is not None:
_details['freeformTags'] = cli_util.parse_json_parameter("freeform_tags", freeform_tags)
@@ -6993,7 +7001,7 @@ def create_unified_audit_policy(ctx, from_json, wait_for_state, max_wait_seconds
cli_util.render_response(result, ctx)
-@user_assessment_group.command(name=cli_util.override('data_safe.create_user_assessment.command_name', 'create'), help=u"""Creates a new saved user assessment for one or multiple targets in a compartment. It saves the latest assessments in the specified compartment. If a scheduled is passed in, this operation persists the latest assessments that exist at the defined date and time, in the format defined by [RFC3339]. \n[Command Reference](createUserAssessment)""")
+@user_assessment_group.command(name=cli_util.override('data_safe.create_user_assessment.command_name', 'create'), help=u"""Creates a new saved user assessment for a target database or target database group in a compartment. It saves the latest assessment in the specified compartment. If a schedule is passed in, this operation persists the latest assessment that exists at the defined date and time, in the format defined by [RFC3339]. \n[Command Reference](createUserAssessment)""")
@cli_util.option('--compartment-id', required=True, help=u"""The OCID of the compartment that contains the user assessment.""")
@cli_util.option('--target-id', required=True, help=u"""The OCID of the target database or target database group on which user assessment is to be run.""")
@cli_util.option('--description', help=u"""The description of the user assessment.""")
@@ -9518,13 +9526,16 @@ def download_privilege_script(ctx, from_json, file, if_match):
@cli_util.option('--security-assessment-id', required=True, help=u"""The OCID of the security assessment.""")
@cli_util.option('--format', required=True, type=custom_types.CliCaseInsensitiveChoice(["PDF", "XLS", "STIGXLS"]), help=u"""Format of the Security Assessment report.""")
@cli_util.option('--file', type=click.File(mode='wb'), required=True, help="The name of the file that will receive the response data, or '-' to write to STDOUT.")
+@cli_util.option('--is-single-report', type=click.BOOL, help=u"""Optional flag controlling the output format of a target group report: - true: Return a single consolidated report file for the entire target group. - false/null (default): Return a ZIP archive containing one file per target in the group.
+
+Important: - This flag is only applicable when the security assessment OCID refers to a target group assessment (targetType TARGET_DATABASE_GROUP). - If `isSingleReport` is set to true for an individual target (targetType TARGET_DATABASE), the request will return an error. - If `isSingleReport` is null or false for an individual target, the value is ignored and the selected output format for the assessment type is returned.""")
@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 download_security_assessment_report(ctx, from_json, file, security_assessment_id, format, if_match):
+def download_security_assessment_report(ctx, from_json, file, security_assessment_id, format, is_single_report, if_match):
if isinstance(security_assessment_id, six.string_types) and len(security_assessment_id.strip()) == 0:
raise click.UsageError('Parameter --security-assessment-id cannot be whitespace or empty string')
@@ -9537,6 +9548,9 @@ def download_security_assessment_report(ctx, from_json, file, security_assessmen
_details = {}
_details['format'] = format
+ if is_single_report is not None:
+ _details['isSingleReport'] = is_single_report
+
client = cli_util.build_client('data_safe', 'data_safe', ctx)
result = client.download_security_assessment_report(
security_assessment_id=security_assessment_id,
@@ -10120,6 +10134,7 @@ def generate_on_prem_connector_configuration(ctx, from_json, file, password, on_
@cli_util.option('--time-less-than', type=custom_types.CLI_DATETIME, help=u"""Specifies the time until which the data needs to be reported.""" + custom_types.CLI_DATETIME.VALID_DATETIME_CLI_HELP_MESSAGE)
@cli_util.option('--time-greater-than', type=custom_types.CLI_DATETIME, help=u"""Specifies the time after which the data needs to be reported.""" + custom_types.CLI_DATETIME.VALID_DATETIME_CLI_HELP_MESSAGE)
@cli_util.option('--row-limit', type=click.INT, help=u"""Specifies the limit on the number of rows in the report.""")
+@cli_util.option('--is-pagination-enabled', type=click.BOOL, help=u"""Indicates if the reports being generated should be pagination enabled. If set to true, multiple reports can be generated and the details of next and previous report are present in Report. Values can either be 'true' or 'false'.""")
@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('--scim-query', help=u"""The scimQuery query parameter accepts filter expressions that use the syntax described in Section 3.2.2.2 of the System for Cross-Domain Identity Management (SCIM) specification, which is available at [RFC3339]. In SCIM filtering expressions, text, date, and time values must be enclosed in quotation marks, with date and time values using ISO-8601 format. (Numeric and boolean values should not be quoted.)
@@ -10132,7 +10147,7 @@ def generate_on_prem_connector_configuration(ctx, from_json, file, password, on_
@click.pass_context
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'target-ids': {'module': 'data_safe', 'class': 'list[string]'}, 'target-group-ids': {'module': 'data_safe', 'class': 'list[string]'}})
@cli_util.wrap_exceptions
-def generate_report(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, report_definition_id, display_name, compartment_id, mime_type, target_ids, target_group_ids, description, time_less_than, time_greater_than, row_limit, if_match, scim_query):
+def generate_report(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, report_definition_id, display_name, compartment_id, mime_type, target_ids, target_group_ids, description, time_less_than, time_greater_than, row_limit, is_pagination_enabled, if_match, scim_query):
if isinstance(report_definition_id, six.string_types) and len(report_definition_id.strip()) == 0:
raise click.UsageError('Parameter --report-definition-id cannot be whitespace or empty string')
@@ -10167,6 +10182,9 @@ def generate_report(ctx, from_json, wait_for_state, max_wait_seconds, wait_inter
if row_limit is not None:
_details['rowLimit'] = row_limit
+ if is_pagination_enabled is not None:
+ _details['isPaginationEnabled'] = is_pagination_enabled
+
client = cli_util.build_client('data_safe', 'data_safe', ctx)
result = client.generate_report(
report_definition_id=report_definition_id,
@@ -10206,6 +10224,9 @@ def generate_report(ctx, from_json, wait_for_state, max_wait_seconds, wait_inter
@security_assessment_group.command(name=cli_util.override('data_safe.generate_security_assessment_report.command_name', 'generate-security-assessment-report'), help=u"""Generates the report of the specified security assessment. You can get the report in PDF or XLS format. After generating the report, use DownloadSecurityAssessmentReport to download it in the preferred format. \n[Command Reference](generateSecurityAssessmentReport)""")
@cli_util.option('--security-assessment-id', required=True, help=u"""The OCID of the security assessment.""")
@cli_util.option('--format', required=True, type=custom_types.CliCaseInsensitiveChoice(["PDF", "XLS", "STIGXLS"]), help=u"""Format of the Security Assessment report.""")
+@cli_util.option('--is-single-report', type=click.BOOL, help=u"""Optional flag controlling the output format of a target group report: - true: Generate a single consolidated report file for the entire target group. - false: Generate a ZIP archive containing one file per target in the group.
+
+Important: - This flag is only applicable when the security assessment OCID refers to a target group assessment (targetType TARGET_DATABASE_GROUP). - If `isSingleReport` is set to true for an individual target (targetType TARGET_DATABASE), the request will return an error. - If `isSingleReport` is null or false for an individual target, the value is ignored and the selected output format for the assessment type is generated.""")
@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", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED", "SUSPENDING", "SUSPENDED"]), 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 ACCEPTED --wait-for-state SUSPENDED 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.""")
@@ -10215,7 +10236,7 @@ def generate_report(ctx, from_json, wait_for_state, max_wait_seconds, wait_inter
@click.pass_context
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={})
@cli_util.wrap_exceptions
-def generate_security_assessment_report(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, security_assessment_id, format, if_match):
+def generate_security_assessment_report(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, security_assessment_id, format, is_single_report, if_match):
if isinstance(security_assessment_id, six.string_types) and len(security_assessment_id.strip()) == 0:
raise click.UsageError('Parameter --security-assessment-id cannot be whitespace or empty string')
@@ -10228,6 +10249,9 @@ def generate_security_assessment_report(ctx, from_json, wait_for_state, max_wait
_details = {}
_details['format'] = format
+ if is_single_report is not None:
+ _details['isSingleReport'] = is_single_report
+
client = cli_util.build_client('data_safe', 'data_safe', ctx)
result = client.generate_security_assessment_report(
security_assessment_id=security_assessment_id,
@@ -12094,7 +12118,7 @@ def list_alerts(ctx, from_json, all_pages, page_size, compartment_id, id, compar
@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('--limit', type=click.INT, help=u"""For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see [List Pagination].""")
@cli_util.option('--page', help=u"""For list pagination. The page token representing the page at which to start retrieving results. It is usually retrieved from a previous \"List\" call. For details about how pagination works, see [List Pagination].""")
-@cli_util.option('--associated-resource-type', type=custom_types.CliCaseInsensitiveChoice(["AUDIT_POLICY"]), help=u"""A filter to return attribute set associated resources that matches the specified resource type query param.""")
+@cli_util.option('--associated-resource-type', type=custom_types.CliCaseInsensitiveChoice(["AUDIT_POLICY", "AUDIT_REPORT"]), help=u"""A filter to return attribute set associated resources that matches the specified resource type query param.""")
@cli_util.option('--associated-resource-id', help=u"""A filter to return attribute set associated resource that matches the specified associated resource id query param.""")
@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.""")
@@ -13022,7 +13046,7 @@ def list_available_audit_volumes(ctx, from_json, all_pages, page_size, audit_pro
@cli_util.option('--limit', type=click.INT, help=u"""For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see [List Pagination].""")
@cli_util.option('--page', help=u"""For list pagination. The page token representing the page at which to start retrieving results. It is usually retrieved from a previous \"List\" call. For details about how pagination works, see [List Pagination].""")
@cli_util.option('--sort-order', type=custom_types.CliCaseInsensitiveChoice(["ASC", "DESC"]), help=u"""The sort order to use, either ascending (ASC) or descending (DESC).""")
-@cli_util.option('--sort-by', type=custom_types.CliCaseInsensitiveChoice(["title", "category"]), help=u"""The field to sort by. You can specify only one sort order(sortOrder). The default order for title is ascending.""")
+@cli_util.option('--sort-by', type=custom_types.CliCaseInsensitiveChoice(["title", "category", "key"]), help=u"""The field to sort by. You can specify only one sort order(sortOrder). The default order for title is ascending.""")
@cli_util.option('--suggested-severity', type=custom_types.CliCaseInsensitiveChoice(["HIGH", "MEDIUM", "LOW", "EVALUATE", "ADVISORY", "PASS", "DEFERRED"]), help=u"""A filter to return only checks of a particular risk level.""")
@cli_util.option('--contains-severity', type=custom_types.CliCaseInsensitiveChoice(["HIGH", "MEDIUM", "LOW", "EVALUATE", "ADVISORY", "PASS", "DEFERRED"]), multiple=True, help=u"""A filter to return only findings that match the specified risk level(s). Use containsSeverity parameter if need to filter by multiple risk levels.""")
@cli_util.option('--contains-references', type=custom_types.CliCaseInsensitiveChoice(["STIG", "CIS", "GDPR"]), multiple=True, help=u"""An optional filter to return only findings that match the specified references. Use containsReferences param if need to filter by multiple references.""")
@@ -13467,7 +13491,7 @@ def list_database_table_access_entries(ctx, from_json, all_pages, page_size, sec
@database_view_access_entry_collection_group.command(name=cli_util.override('data_safe.list_database_view_access_entries.command_name', 'list-database-view-access-entries'), help=u"""Retrieves a list of all database view access entries in Data Safe.
-The ListDatabaseViewAccessEntries operation returns only the database view access objects for the specified security policy report. \n[Command Reference](listDatabaseViewAccessEntries)""")
+The ListDatabaseViewAccessEntries operation returns only the database view access objects for the specified security policy report. If targetId is specified, it must match the target associated with the securityPolicyReportId path parameter; otherwise, the request is rejected. \n[Command Reference](listDatabaseViewAccessEntries)""")
@cli_util.option('--security-policy-report-id', required=True, help=u"""The OCID of the security policy report resource.""")
@cli_util.option('--limit', type=click.INT, help=u"""For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see [List Pagination].""")
@cli_util.option('--page', help=u"""For list pagination. The page token representing the page at which to start retrieving results. It is usually retrieved from a previous \"List\" call. For details about how pagination works, see [List Pagination].""")
@@ -13937,6 +13961,7 @@ def list_finding_analytics(ctx, from_json, all_pages, page_size, compartment_id,
@cli_util.option('--severity', type=custom_types.CliCaseInsensitiveChoice(["HIGH", "MEDIUM", "LOW", "EVALUATE", "ADVISORY", "PASS", "DEFERRED"]), help=u"""A filter to return only findings of a particular risk level.""")
@cli_util.option('--contains-severity', type=custom_types.CliCaseInsensitiveChoice(["HIGH", "MEDIUM", "LOW", "EVALUATE", "ADVISORY", "PASS", "DEFERRED"]), multiple=True, help=u"""A filter to return only findings that match the specified risk level(s). Use containsSeverity parameter if need to filter by multiple risk levels.""")
@cli_util.option('--category', help=u"""The category of the finding.""")
+@cli_util.option('--contains-oracle-defined-severity', type=custom_types.CliCaseInsensitiveChoice(["HIGH", "MEDIUM", "LOW", "EVALUATE", "ADVISORY", "PASS", "DEFERRED"]), multiple=True, help=u"""A filter to return only findings that match the specified risk level(s). Use containsOracleDefinedSeverity parameter if need to filter by one or multiple risk levels.""")
@cli_util.option('--lifecycle-state', type=custom_types.CliCaseInsensitiveChoice(["ACTIVE", "UPDATING", "NEEDS_ATTENTION", "FAILED"]), help=u"""A filter to return only the findings that match the specified lifecycle states.""")
@cli_util.option('--references', type=custom_types.CliCaseInsensitiveChoice(["STIG", "CIS", "GDPR"]), help=u"""An optional filter to return only findings that match the specified reference.""")
@cli_util.option('--contains-references', type=custom_types.CliCaseInsensitiveChoice(["STIG", "CIS", "GDPR"]), multiple=True, help=u"""An optional filter to return only findings that match the specified references. Use containsReferences param if need to filter by multiple references.""")
@@ -13963,7 +13988,7 @@ def list_finding_analytics(ctx, from_json, all_pages, page_size, compartment_id,
@click.pass_context
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'target-ids': {'module': 'data_safe', 'class': 'list[string]'}}, output_type={'module': 'data_safe', 'class': 'list[FindingSummary]'})
@cli_util.wrap_exceptions
-def list_findings(ctx, from_json, all_pages, page_size, security_assessment_id, is_top_finding, severity, contains_severity, category, lifecycle_state, references, contains_references, limit, page, compartment_id, compartment_id_in_subtree, access_level, target_id, target_ids, scim_query, field, sort_by, sort_order, finding_key):
+def list_findings(ctx, from_json, all_pages, page_size, security_assessment_id, is_top_finding, severity, contains_severity, category, contains_oracle_defined_severity, lifecycle_state, references, contains_references, limit, page, compartment_id, compartment_id_in_subtree, access_level, target_id, target_ids, scim_query, field, sort_by, sort_order, finding_key):
if all_pages and limit:
raise click.UsageError('If you provide the --all option you cannot provide the --limit option')
@@ -13980,6 +14005,8 @@ def list_findings(ctx, from_json, all_pages, page_size, security_assessment_id,
kwargs['contains_severity'] = contains_severity
if category is not None:
kwargs['category'] = category
+ if contains_oracle_defined_severity is not None and len(contains_oracle_defined_severity) > 0:
+ kwargs['contains_oracle_defined_severity'] = contains_oracle_defined_severity
if lifecycle_state is not None:
kwargs['lifecycle_state'] = lifecycle_state
if references is not None:
@@ -18112,6 +18139,7 @@ def list_tables(ctx, from_json, all_pages, page_size, target_database_id, limit,
@cli_util.option('--page', help=u"""For list pagination. The page token representing the page at which to start retrieving results. It is usually retrieved from a previous \"List\" call. For details about how pagination works, see [List Pagination].""")
@cli_util.option('--sort-order', type=custom_types.CliCaseInsensitiveChoice(["ASC", "DESC"]), help=u"""The sort order to use, either ascending (ASC) or descending (DESC).""")
@cli_util.option('--sort-by', type=custom_types.CliCaseInsensitiveChoice(["DISPLAYNAME", "TIMECREATED", "TIMEUPDATED"]), help=u"""The field to sort by. Only one sort parameter may be provided.""")
+@cli_util.option('--target-type', type=custom_types.CliCaseInsensitiveChoice(["TARGET_DATABASE", "TARGET_DATABASE_GROUP"]), help=u"""A optional filter to return only resources that belong to the specified alert policy association type.""")
@cli_util.option('--time-created-greater-than-or-equal-to', type=custom_types.CLI_DATETIME, help=u"""A filter to return only the resources that were created after the specified date and time, as defined by [RFC3339]. Using TimeCreatedGreaterThanOrEqualToQueryParam parameter retrieves all resources created after that date.
**Example:** 2016-12-19T16:39:57.600Z""" + custom_types.CLI_DATETIME.VALID_DATETIME_CLI_HELP_MESSAGE)
@@ -18127,7 +18155,7 @@ def list_tables(ctx, from_json, all_pages, page_size, target_database_id, limit,
@click.pass_context
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'data_safe', 'class': 'TargetAlertPolicyAssociationCollection'})
@cli_util.wrap_exceptions
-def list_target_alert_policy_associations(ctx, from_json, all_pages, page_size, compartment_id, target_alert_policy_association_id, alert_policy_id, target_id, lifecycle_state, limit, page, sort_order, sort_by, time_created_greater_than_or_equal_to, time_created_less_than, compartment_id_in_subtree, access_level):
+def list_target_alert_policy_associations(ctx, from_json, all_pages, page_size, compartment_id, target_alert_policy_association_id, alert_policy_id, target_id, lifecycle_state, limit, page, sort_order, sort_by, target_type, time_created_greater_than_or_equal_to, time_created_less_than, compartment_id_in_subtree, access_level):
if all_pages and limit:
raise click.UsageError('If you provide the --all option you cannot provide the --limit option')
@@ -18149,6 +18177,8 @@ def list_target_alert_policy_associations(ctx, from_json, all_pages, page_size,
kwargs['sort_order'] = sort_order
if sort_by is not None:
kwargs['sort_by'] = sort_by
+ if target_type is not None:
+ kwargs['target_type'] = target_type
if time_created_greater_than_or_equal_to is not None:
kwargs['time_created_greater_than_or_equal_to'] = time_created_greater_than_or_equal_to
if time_created_less_than is not None:
@@ -18184,6 +18214,63 @@ def list_target_alert_policy_associations(ctx, from_json, all_pages, page_size,
cli_util.render_response(result, ctx)
+@target_alert_policy_association_group.command(name=cli_util.override('data_safe.list_target_alert_policy_unassociated_members.command_name', 'list-target-alert-policy-unassociated-members'), help=u"""Gets the details of target-alert policy association and its unassociated members by its ID. \n[Command Reference](listTargetAlertPolicyUnassociatedMembers)""")
+@cli_util.option('--target-alert-policy-association-id', required=True, help=u"""The OCID of the target-alert policy association.""")
+@cli_util.option('--limit', type=click.INT, help=u"""For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see [List Pagination].""")
+@cli_util.option('--page', help=u"""For list pagination. The page token representing the page at which to start retrieving results. It is usually retrieved from a previous \"List\" call. For details about how pagination works, see [List Pagination].""")
+@cli_util.option('--sort-by', type=custom_types.CliCaseInsensitiveChoice(["targetId", "notAppliedReason"]), help=u"""The field to sort by. Only one sort parameter may be provided.""")
+@cli_util.option('--sort-order', type=custom_types.CliCaseInsensitiveChoice(["ASC", "DESC"]), help=u"""The sort order to use, either ascending (ASC) or descending (DESC).""")
+@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': 'data_safe', 'class': 'TargetAlertPolicyUnassociatedCollection'})
+@cli_util.wrap_exceptions
+def list_target_alert_policy_unassociated_members(ctx, from_json, all_pages, page_size, target_alert_policy_association_id, limit, page, sort_by, sort_order):
+
+ if all_pages and limit:
+ raise click.UsageError('If you provide the --all option you cannot provide the --limit option')
+
+ if isinstance(target_alert_policy_association_id, six.string_types) and len(target_alert_policy_association_id.strip()) == 0:
+ raise click.UsageError('Parameter --target-alert-policy-association-id cannot be whitespace or empty string')
+
+ kwargs = {}
+ if limit is not None:
+ kwargs['limit'] = limit
+ if page is not None:
+ kwargs['page'] = page
+ if sort_by is not None:
+ kwargs['sort_by'] = sort_by
+ if sort_order is not None:
+ kwargs['sort_order'] = sort_order
+ kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
+ client = cli_util.build_client('data_safe', 'data_safe', ctx)
+ if all_pages:
+ if page_size:
+ kwargs['limit'] = page_size
+
+ result = cli_util.list_call_get_all_results(
+ client.list_target_alert_policy_unassociated_members,
+ target_alert_policy_association_id=target_alert_policy_association_id,
+ **kwargs
+ )
+ elif limit is not None:
+ result = cli_util.list_call_get_up_to_limit(
+ client.list_target_alert_policy_unassociated_members,
+ limit,
+ page_size,
+ target_alert_policy_association_id=target_alert_policy_association_id,
+ **kwargs
+ )
+ else:
+ result = client.list_target_alert_policy_unassociated_members(
+ target_alert_policy_association_id=target_alert_policy_association_id,
+ **kwargs
+ )
+ cli_util.render_response(result, ctx)
+
+
@target_database_group_summary_group.command(name=cli_util.override('data_safe.list_target_database_groups.command_name', 'list-target-database-groups'), help=u"""Retrieves a list of target database groups according to the specified query parameters. \n[Command Reference](listTargetDatabaseGroups)""")
@cli_util.option('--compartment-id', required=True, help=u"""A filter to return only resources that match the specified compartment OCID.""")
@cli_util.option('--display-name', help=u"""A filter to return only resources that match the specified display name.""")
@@ -19040,6 +19127,7 @@ def list_user_assessments(ctx, from_json, all_pages, page_size, compartment_id,
@cli_util.option('--time-password-expiry-greater-than-or-equal-to', type=custom_types.CLI_DATETIME, help=u"""A filter to return users whose password expiry date in the database is greater than or equal to the date and time specified, in the format defined by [RFC3339]. **Example:** 2016-12-19T16:39:57.600Z""" + custom_types.CLI_DATETIME.VALID_DATETIME_CLI_HELP_MESSAGE)
@cli_util.option('--time-password-expiry-less-than', type=custom_types.CLI_DATETIME, help=u"""A filter to return users whose password expiry date in the database is less than the date and time specified, in the format defined by [RFC3339]. **Example:** 2016-12-19T16:39:57.600Z""" + custom_types.CLI_DATETIME.VALID_DATETIME_CLI_HELP_MESSAGE)
@cli_util.option('--page', help=u"""For list pagination. The page token representing the page at which to start retrieving results. It is usually retrieved from a previous \"List\" call. For details about how pagination works, see [List Pagination].""")
+@cli_util.option('--compartment-id', help=u"""A filter to return only resources that match the specified compartment OCID.""")
@cli_util.option('--sort-order', type=custom_types.CliCaseInsensitiveChoice(["ASC", "DESC"]), help=u"""The sort order to use, either ascending (ASC) or descending (DESC).""")
@cli_util.option('--sort-by', type=custom_types.CliCaseInsensitiveChoice(["userName", "userCategory", "accountStatus", "timeLastLogin", "targetId", "timeUserCreated", "authenticationType", "timePasswordChanged"]), help=u"""The field to sort by. You can specify only one sort order (sortOrder). The default order for userName is ascending.""")
@cli_util.option('--schema-list', multiple=True, help=u"""A filter to return items that contain the specified schema list.""")
@@ -19051,7 +19139,7 @@ def list_user_assessments(ctx, from_json, all_pages, page_size, compartment_id,
@click.pass_context
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'schema-list': {'module': 'data_safe', 'class': 'list[string]'}}, output_type={'module': 'data_safe', 'class': 'list[UserSummary]'})
@cli_util.wrap_exceptions
-def list_users(ctx, from_json, all_pages, page_size, user_assessment_id, limit, compartment_id_in_subtree, access_level, user_category, user_role, user_profile, user_type, user_key, account_status, authentication_type, user_name, target_id, time_last_login_greater_than_or_equal_to, time_last_login_less_than, time_user_created_greater_than_or_equal_to, time_user_created_less_than, time_password_last_changed_greater_than_or_equal_to, time_password_last_changed_less_than, time_password_expiry_greater_than_or_equal_to, time_password_expiry_less_than, page, sort_order, sort_by, schema_list, are_all_schemas_accessible):
+def list_users(ctx, from_json, all_pages, page_size, user_assessment_id, limit, compartment_id_in_subtree, access_level, user_category, user_role, user_profile, user_type, user_key, account_status, authentication_type, user_name, target_id, time_last_login_greater_than_or_equal_to, time_last_login_less_than, time_user_created_greater_than_or_equal_to, time_user_created_less_than, time_password_last_changed_greater_than_or_equal_to, time_password_last_changed_less_than, time_password_expiry_greater_than_or_equal_to, time_password_expiry_less_than, page, compartment_id, sort_order, sort_by, schema_list, are_all_schemas_accessible):
if all_pages and limit:
raise click.UsageError('If you provide the --all option you cannot provide the --limit option')
@@ -19102,6 +19190,8 @@ def list_users(ctx, from_json, all_pages, page_size, user_assessment_id, limit,
kwargs['time_password_expiry_less_than'] = time_password_expiry_less_than
if page is not None:
kwargs['page'] = page
+ if compartment_id is not None:
+ kwargs['compartment_id'] = compartment_id
if sort_order is not None:
kwargs['sort_order'] = sort_order
if sort_by is not None:
@@ -20886,6 +20976,7 @@ def retrieve_audit_policies(ctx, from_json, wait_for_state, max_wait_seconds, wa
@cli_util.option('--compartment-id', required=True, help=u"""The OCID of the compartment in which the resource should be created.""")
@cli_util.option('--report-details', 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"""The name of the report to be scheduled""")
+@cli_util.option('--is-pagination-enabled', type=click.BOOL, help=u"""Indicates if the reports being generated should be paginated. If set to true, multiple reports can be generated and the details of next and previous report are present in Report. Values can either be 'true' or 'false'.""")
@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", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED", "SUSPENDING", "SUSPENDED"]), 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 ACCEPTED --wait-for-state SUSPENDED 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.""")
@@ -20895,7 +20986,7 @@ def retrieve_audit_policies(ctx, from_json, wait_for_state, max_wait_seconds, wa
@click.pass_context
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'report-details': {'module': 'data_safe', 'class': 'ReportDetails'}})
@cli_util.wrap_exceptions
-def schedule_report(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, report_definition_id, schedule, mime_type, compartment_id, report_details, display_name, if_match):
+def schedule_report(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, report_definition_id, schedule, mime_type, compartment_id, report_details, display_name, is_pagination_enabled, if_match):
if isinstance(report_definition_id, six.string_types) and len(report_definition_id.strip()) == 0:
raise click.UsageError('Parameter --report-definition-id cannot be whitespace or empty string')
@@ -20914,6 +21005,9 @@ def schedule_report(ctx, from_json, wait_for_state, max_wait_seconds, wait_inter
if display_name is not None:
_details['displayName'] = display_name
+ if is_pagination_enabled is not None:
+ _details['isPaginationEnabled'] = is_pagination_enabled
+
client = cli_util.build_client('data_safe', 'data_safe', ctx)
result = client.schedule_report(
report_definition_id=report_definition_id,
@@ -20959,6 +21053,7 @@ def schedule_report(ctx, from_json, wait_for_state, max_wait_seconds, wait_inter
@cli_util.option('--compartment-id', required=True, help=u"""The OCID of the compartment in which the resource should be created.""")
@cli_util.option('--report-details-record-time-span', required=True, help=u"""The time span of records in report to be scheduled. Allowed period strings - \"H\",\"D\",\"M\",\"Y\" Each of the above fields potentially introduce constraints. A workRequest is created only when period-value satisfies all the constraints. Constraints introduced: 1. period = H (The allowed range for period-value is [1, 23]) 2. period = D (The allowed range for period-value is [1, 30]) 3. period = M (The allowed range for period-value is [1, 11]) 4. period = Y (The minimum period-value is 1)""")
@cli_util.option('--display-name', help=u"""The name of the report to be scheduled""")
+@cli_util.option('--is-pagination-enabled', type=click.BOOL, help=u"""Indicates if the reports being generated should be paginated. If set to true, multiple reports can be generated and the details of next and previous report are present in Report. Values can either be 'true' or 'false'.""")
@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('--report-details-row-limit', type=click.INT, help=u"""Specifies the limit on the number of rows in the report.""")
@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED", "SUSPENDING", "SUSPENDED"]), 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 ACCEPTED --wait-for-state SUSPENDED 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.""")
@@ -20969,7 +21064,7 @@ def schedule_report(ctx, from_json, wait_for_state, max_wait_seconds, wait_inter
@click.pass_context
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={})
@cli_util.wrap_exceptions
-def schedule_report_schedule_audit_report_details(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, report_definition_id, schedule, mime_type, compartment_id, report_details_record_time_span, display_name, if_match, report_details_row_limit):
+def schedule_report_schedule_audit_report_details(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, report_definition_id, schedule, mime_type, compartment_id, report_details_record_time_span, display_name, is_pagination_enabled, if_match, report_details_row_limit):
if isinstance(report_definition_id, six.string_types) and len(report_definition_id.strip()) == 0:
raise click.UsageError('Parameter --report-definition-id cannot be whitespace or empty string')
@@ -20989,6 +21084,9 @@ def schedule_report_schedule_audit_report_details(ctx, from_json, wait_for_state
if display_name is not None:
_details['displayName'] = display_name
+ if is_pagination_enabled is not None:
+ _details['isPaginationEnabled'] = is_pagination_enabled
+
if report_details_row_limit is not None:
_details['reportDetails']['rowLimit'] = report_details_row_limit
@@ -22220,23 +22318,24 @@ def update_audit_trail(ctx, from_json, force, wait_for_state, max_wait_seconds,
Example: `{\"Department\": \"Finance\"}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
@cli_util.option('--defined-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags] Example: `{\"Operations\": {\"CostCenter\": \"42\"}}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
+@cli_util.option('--security-attributes', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Security attributes for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags]. Example: `{\"Oracle-ZPR\": {\"MaxEgressCount\": {\"value\": \"42\", \"mode\": \"enforce\"}}}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
@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('--force', help="""Perform update without prompting for confirmation.""", is_flag=True)
@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED", "SUSPENDING", "SUSPENDED"]), 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 ACCEPTED --wait-for-state SUSPENDED 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({'nsg-ids': {'module': 'data_safe', 'class': 'list[string]'}, 'freeform-tags': {'module': 'data_safe', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'data_safe', 'class': 'dict(str, dict(str, object))'}})
+@json_skeleton_utils.get_cli_json_input_option({'nsg-ids': {'module': 'data_safe', 'class': 'list[string]'}, 'freeform-tags': {'module': 'data_safe', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'data_safe', 'class': 'dict(str, dict(str, object))'}, 'security-attributes': {'module': 'data_safe', 'class': 'dict(str, dict(str, object))'}})
@cli_util.help_option
@click.pass_context
-@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'nsg-ids': {'module': 'data_safe', 'class': 'list[string]'}, 'freeform-tags': {'module': 'data_safe', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'data_safe', 'class': 'dict(str, dict(str, object))'}})
+@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'nsg-ids': {'module': 'data_safe', 'class': 'list[string]'}, 'freeform-tags': {'module': 'data_safe', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'data_safe', 'class': 'dict(str, dict(str, object))'}, 'security-attributes': {'module': 'data_safe', 'class': 'dict(str, dict(str, object))'}})
@cli_util.wrap_exceptions
-def update_data_safe_private_endpoint(ctx, from_json, force, wait_for_state, max_wait_seconds, wait_interval_seconds, data_safe_private_endpoint_id, display_name, description, nsg_ids, freeform_tags, defined_tags, if_match):
+def update_data_safe_private_endpoint(ctx, from_json, force, wait_for_state, max_wait_seconds, wait_interval_seconds, data_safe_private_endpoint_id, display_name, description, nsg_ids, freeform_tags, defined_tags, security_attributes, if_match):
if isinstance(data_safe_private_endpoint_id, six.string_types) and len(data_safe_private_endpoint_id.strip()) == 0:
raise click.UsageError('Parameter --data-safe-private-endpoint-id cannot be whitespace or empty string')
if not force:
- if nsg_ids or freeform_tags or defined_tags:
- if not click.confirm("WARNING: Updates to nsg-ids and freeform-tags and defined-tags will replace any existing values. Are you sure you want to continue?"):
+ if nsg_ids or freeform_tags or defined_tags or security_attributes:
+ if not click.confirm("WARNING: Updates to nsg-ids and freeform-tags and defined-tags and security-attributes will replace any existing values. Are you sure you want to continue?"):
ctx.abort()
kwargs = {}
@@ -22261,6 +22360,9 @@ def update_data_safe_private_endpoint(ctx, from_json, force, wait_for_state, max
if defined_tags is not None:
_details['definedTags'] = cli_util.parse_json_parameter("defined_tags", defined_tags)
+ if security_attributes is not None:
+ _details['securityAttributes'] = cli_util.parse_json_parameter("security_attributes", security_attributes)
+
client = cli_util.build_client('data_safe', 'data_safe', ctx)
result = client.update_data_safe_private_endpoint(
data_safe_private_endpoint_id=data_safe_private_endpoint_id,
diff --git a/services/data_safe/tests/util/generated/command_to_api.py b/services/data_safe/tests/util/generated/command_to_api.py
index 5a21f41c6..ce7909b81 100644
--- a/services/data_safe/tests/util/generated/command_to_api.py
+++ b/services/data_safe/tests/util/generated/command_to_api.py
@@ -281,6 +281,7 @@
"data_safe.list_sql_firewall_violations": "oci.data_safe.DataSafeClient.list_sql_firewall_violations",
"data_safe.list_tables": "oci.data_safe.DataSafeClient.list_tables",
"data_safe.list_target_alert_policy_associations": "oci.data_safe.DataSafeClient.list_target_alert_policy_associations",
+ "data_safe.list_target_alert_policy_unassociated_members": "oci.data_safe.DataSafeClient.list_target_alert_policy_unassociated_members",
"data_safe.list_target_database_groups": "oci.data_safe.DataSafeClient.list_target_database_groups",
"data_safe.list_target_databases": "oci.data_safe.DataSafeClient.list_target_databases",
"data_safe.list_target_overrides": "oci.data_safe.DataSafeClient.list_target_overrides",
diff --git a/services/datacc/__init__.py b/services/datacc/__init__.py
new file mode 100644
index 000000000..2aff0b53a
--- /dev/null
+++ b/services/datacc/__init__.py
@@ -0,0 +1,4 @@
+# coding: utf-8
+# Copyright (c) 2016, 2026, 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: 20251101
diff --git a/services/datacc/src/__init__.py b/services/datacc/src/__init__.py
new file mode 100644
index 000000000..2aff0b53a
--- /dev/null
+++ b/services/datacc/src/__init__.py
@@ -0,0 +1,4 @@
+# coding: utf-8
+# Copyright (c) 2016, 2026, 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: 20251101
diff --git a/services/datacc/src/oci_cli_baseinfra/__init__.py b/services/datacc/src/oci_cli_baseinfra/__init__.py
new file mode 100644
index 000000000..2aff0b53a
--- /dev/null
+++ b/services/datacc/src/oci_cli_baseinfra/__init__.py
@@ -0,0 +1,4 @@
+# coding: utf-8
+# Copyright (c) 2016, 2026, 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: 20251101
diff --git a/services/datacc/src/oci_cli_baseinfra/baseinfra_cli_extended.py b/services/datacc/src/oci_cli_baseinfra/baseinfra_cli_extended.py
new file mode 100644
index 000000000..052746824
--- /dev/null
+++ b/services/datacc/src/oci_cli_baseinfra/baseinfra_cli_extended.py
@@ -0,0 +1,69 @@
+# 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.datacc.src.oci_cli_baseinfra.generated import baseinfra_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 datacc work-request-log-entry -> oci datacc work-request-log
+cli_util.rename_command(baseinfra_cli, baseinfra_cli.datacc_root_group, baseinfra_cli.work_request_log_entry_group, "work-request-log")
+
+
+# Move commands under 'oci datacc infrastructure-summary' -> 'oci datacc infrastructure'
+baseinfra_cli.datacc_root_group.commands.pop(baseinfra_cli.infrastructure_summary_group.name)
+baseinfra_cli.infrastructure_group.add_command(baseinfra_cli.list_infrastructures)
+
+
+# Move commands under 'oci datacc vm-cluster-network-summary' -> 'oci datacc vm-cluster-network'
+baseinfra_cli.datacc_root_group.commands.pop(baseinfra_cli.vm_cluster_network_summary_group.name)
+baseinfra_cli.vm_cluster_network_group.add_command(baseinfra_cli.list_vm_cluster_networks)
+
+
+# Move commands under 'oci datacc vm-instance-summary' -> 'oci datacc vm-instance'
+baseinfra_cli.datacc_root_group.commands.pop(baseinfra_cli.vm_instance_summary_group.name)
+baseinfra_cli.vm_instance_group.add_command(baseinfra_cli.list_vm_instances)
+
+
+@cli_util.copy_params_from_generated_command(baseinfra_cli.create_infrastructure, params_to_exclude=['cloud_control_plane_server1', 'cloud_control_plane_server2'])
+@baseinfra_cli.infrastructure_group.command(name=baseinfra_cli.create_infrastructure.name, help=baseinfra_cli.create_infrastructure.help)
+@cli_util.option('--control-plane-server2', required=True, help="""The IP address for the second control plane server. [required]""")
+@cli_util.option('--control-plane-server1', required=True, help=u"""The IP address for the first control plane server. [required]""")
+@click.pass_context
+@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'contacts': {'module': 'datacc', 'class': 'list[InfrastructureContact]'}, 'dns-servers': {'module': 'datacc', 'class': 'list[string]'}, 'ntp-servers': {'module': 'datacc', 'class': 'list[string]'}, 'maintenance-window': {'module': 'datacc', 'class': 'MaintenanceWindow'}, 'freeform-tags': {'module': 'datacc', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'datacc', 'class': 'dict(str, dict(str, object))'}}, output_type={'module': 'datacc', 'class': 'Infrastructure'})
+@cli_util.wrap_exceptions
+def create_infrastructure_extended(ctx, **kwargs):
+
+ if 'control_plane_server2' in kwargs:
+ kwargs['cloud_control_plane_server2'] = kwargs['control_plane_server2']
+ kwargs.pop('control_plane_server2')
+
+ if 'control_plane_server1' in kwargs:
+ kwargs['cloud_control_plane_server1'] = kwargs['control_plane_server1']
+ kwargs.pop('control_plane_server1')
+
+ ctx.invoke(baseinfra_cli.create_infrastructure, **kwargs)
+
+
+@cli_util.copy_params_from_generated_command(baseinfra_cli.update_infrastructure, params_to_exclude=['cloud_control_plane_server1', 'cloud_control_plane_server2'])
+@baseinfra_cli.infrastructure_group.command(name=baseinfra_cli.update_infrastructure.name, help=baseinfra_cli.update_infrastructure.help)
+@cli_util.option('--control-plane-server2', help="""The IP address for the second control plane server.""")
+@cli_util.option('--control-plane-server1', help=u"""The IP address for the first control plane server.""")
+@click.pass_context
+@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'contacts': {'module': 'datacc', 'class': 'list[InfrastructureContact]'}, 'dns-servers': {'module': 'datacc', 'class': 'list[string]'}, 'ntp-servers': {'module': 'datacc', 'class': 'list[string]'}, 'maintenance-window': {'module': 'datacc', 'class': 'MaintenanceWindow'}, 'defined-tags': {'module': 'datacc', 'class': 'dict(str, dict(str, object))'}, 'freeform-tags': {'module': 'datacc', 'class': 'dict(str, string)'}}, output_type={'module': 'datacc', 'class': 'Infrastructure'})
+@cli_util.wrap_exceptions
+def update_infrastructure_extended(ctx, **kwargs):
+
+ if 'control_plane_server2' in kwargs:
+ kwargs['cloud_control_plane_server2'] = kwargs['control_plane_server2']
+ kwargs.pop('control_plane_server2')
+
+ if 'control_plane_server1' in kwargs:
+ kwargs['cloud_control_plane_server1'] = kwargs['control_plane_server1']
+ kwargs.pop('control_plane_server1')
+
+ ctx.invoke(baseinfra_cli.update_infrastructure, **kwargs)
diff --git a/services/datacc/src/oci_cli_baseinfra/generated/__init__.py b/services/datacc/src/oci_cli_baseinfra/generated/__init__.py
new file mode 100644
index 000000000..2aff0b53a
--- /dev/null
+++ b/services/datacc/src/oci_cli_baseinfra/generated/__init__.py
@@ -0,0 +1,4 @@
+# coding: utf-8
+# Copyright (c) 2016, 2026, 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: 20251101
diff --git a/services/datacc/src/oci_cli_baseinfra/generated/baseinfra_cli.py b/services/datacc/src/oci_cli_baseinfra/generated/baseinfra_cli.py
new file mode 100644
index 000000000..4f1d7bc81
--- /dev/null
+++ b/services/datacc/src/oci_cli_baseinfra/generated/baseinfra_cli.py
@@ -0,0 +1,2722 @@
+# coding: utf-8
+# Copyright (c) 2016, 2026, 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: 20251101
+
+from __future__ import print_function
+import click
+import oci # noqa: F401
+import six # noqa: F401
+import sys # noqa: F401
+from oci_cli.cli_root import cli
+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
+
+
+@cli.command(cli_util.override('datacc.datacc_root_group.command_name', 'datacc'), cls=CommandGroupWithAlias, help=cli_util.override('datacc.datacc_root_group.help', """API for Database Infrastructure Cloud@Customer Service. Use this API to manage Database Infrastructure VM clusters, Application VMs, and related resources."""), short_help=cli_util.override('datacc.datacc_root_group.short_help', """Database Infrastructure Cloud@Customer Service API"""))
+@cli_util.help_option_group
+def datacc_root_group():
+ pass
+
+
+@click.command(cli_util.override('datacc.infrastructure_scale_option_group.command_name', 'infrastructure-scale-option'), cls=CommandGroupWithAlias, help="""The available scale options for the infrastructure.""")
+@cli_util.help_option_group
+def infrastructure_scale_option_group():
+ pass
+
+
+@click.command(cli_util.override('datacc.maintenance_execution_group.command_name', 'maintenance-execution'), cls=CommandGroupWithAlias, help="""Details of a maintenance executions.""")
+@cli_util.help_option_group
+def maintenance_execution_group():
+ pass
+
+
+@click.command(cli_util.override('datacc.infrastructure_summary_group.command_name', 'infrastructure-summary'), cls=CommandGroupWithAlias, help="""Database Infrastructure resource summary.""")
+@cli_util.help_option_group
+def infrastructure_summary_group():
+ pass
+
+
+@click.command(cli_util.override('datacc.vm_cluster_network_group.command_name', 'vm-cluster-network'), cls=CommandGroupWithAlias, help="""Details of the VM cluster network on Database Infrastructure.""")
+@cli_util.help_option_group
+def vm_cluster_network_group():
+ pass
+
+
+@click.command(cli_util.override('datacc.infrastructure_group.command_name', 'infrastructure'), cls=CommandGroupWithAlias, help="""Details about Database Infrastructure resource.""")
+@cli_util.help_option_group
+def infrastructure_group():
+ pass
+
+
+@click.command(cli_util.override('datacc.vm_instance_group.command_name', 'vm-instance'), cls=CommandGroupWithAlias, help="""VM instance details.""")
+@cli_util.help_option_group
+def vm_instance_group():
+ pass
+
+
+@click.command(cli_util.override('datacc.work_request_error_group.command_name', 'work-request-error'), cls=CommandGroupWithAlias, help="""An error encountered while executing a work request.""")
+@cli_util.help_option_group
+def work_request_error_group():
+ pass
+
+
+@click.command(cli_util.override('datacc.maintenance_run_group.command_name', 'maintenance-run'), cls=CommandGroupWithAlias, help="""Details of a maintenance run.""")
+@cli_util.help_option_group
+def maintenance_run_group():
+ pass
+
+
+@click.command(cli_util.override('datacc.vm_instance_summary_group.command_name', 'vm-instance-summary'), cls=CommandGroupWithAlias, help="""VM instance on Database Infrastructure summary.""")
+@cli_util.help_option_group
+def vm_instance_summary_group():
+ pass
+
+
+@click.command(cli_util.override('datacc.work_request_log_entry_group.command_name', 'work-request-log-entry'), cls=CommandGroupWithAlias, help="""A log message from the execution of a work request.""")
+@cli_util.help_option_group
+def work_request_log_entry_group():
+ pass
+
+
+@click.command(cli_util.override('datacc.work_request_group.command_name', 'work-request'), cls=CommandGroupWithAlias, help="""Work request details.""")
+@cli_util.help_option_group
+def work_request_group():
+ pass
+
+
+@click.command(cli_util.override('datacc.vm_cluster_network_summary_group.command_name', 'vm-cluster-network-summary'), cls=CommandGroupWithAlias, help="""Summary of the VM cluster network on Database Infrastructure.""")
+@cli_util.help_option_group
+def vm_cluster_network_summary_group():
+ pass
+
+
+datacc_root_group.add_command(infrastructure_scale_option_group)
+datacc_root_group.add_command(maintenance_execution_group)
+datacc_root_group.add_command(infrastructure_summary_group)
+datacc_root_group.add_command(vm_cluster_network_group)
+datacc_root_group.add_command(infrastructure_group)
+datacc_root_group.add_command(vm_instance_group)
+datacc_root_group.add_command(work_request_error_group)
+datacc_root_group.add_command(maintenance_run_group)
+datacc_root_group.add_command(vm_instance_summary_group)
+datacc_root_group.add_command(work_request_log_entry_group)
+datacc_root_group.add_command(work_request_group)
+datacc_root_group.add_command(vm_cluster_network_summary_group)
+
+
+@infrastructure_group.command(name=cli_util.override('datacc.activate_infrastructure.command_name', 'activate'), help=u"""Activate an Database Infrastructure using the specified details. \n[Command Reference](activateInfrastructure)""")
+@cli_util.option('--activation-zip-file', required=True, help=u"""The activation zip file.""")
+@cli_util.option('--infrastructure-id', required=True, help=u"""The [OCID] of the Database Infrastructure.""")
+@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 is updated or deleted only if the Etag that you provide matches the current Etag value for the resource.""")
+@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED", "WAITING"]), 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 ACCEPTED --wait-for-state WAITING 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={}, output_type={'module': 'datacc', 'class': 'Infrastructure'})
+@cli_util.wrap_exceptions
+def activate_infrastructure(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, activation_zip_file, infrastructure_id, if_match):
+
+ if isinstance(infrastructure_id, six.string_types) and len(infrastructure_id.strip()) == 0:
+ raise click.UsageError('Parameter --infrastructure-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['activationZipFile'] = activation_zip_file
+
+ client = cli_util.build_client('datacc', 'baseinfra', ctx)
+ result = client.activate_infrastructure(
+ infrastructure_id=infrastructure_id,
+ activate_infrastructure_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)
+
+
+@infrastructure_group.command(name=cli_util.override('datacc.change_infrastructure_compartment.command_name', 'change-compartment'), help=u"""Change the Database Infrastructure Cloud@Customer Compartment to the specified [OCID]. \n[Command Reference](changeInfrastructureCompartment)""")
+@cli_util.option('--infrastructure-id', required=True, help=u"""The [OCID] of the Database Infrastructure.""")
+@cli_util.option('--compartment-id', required=True, help=u"""The [OCID] of the compartment to which the Database Infrastructure Cloud@Customer is moving.""")
+@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 is updated or deleted only if the Etag that you provide matches the current Etag value for the resource.""")
+@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED", "WAITING"]), 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 ACCEPTED --wait-for-state WAITING 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 change_infrastructure_compartment(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, infrastructure_id, compartment_id, if_match):
+
+ if isinstance(infrastructure_id, six.string_types) and len(infrastructure_id.strip()) == 0:
+ raise click.UsageError('Parameter --infrastructure-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('datacc', 'baseinfra', ctx)
+ result = client.change_infrastructure_compartment(
+ infrastructure_id=infrastructure_id,
+ change_infrastructure_compartment_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)
+
+
+@vm_cluster_network_group.command(name=cli_util.override('datacc.change_vm_cluster_network_compartment.command_name', 'change-compartment'), help=u"""Change the VM cluster network Compartment to the specified [OCID]. \n[Command Reference](changeVmClusterNetworkCompartment)""")
+@cli_util.option('--vm-cluster-network-id', required=True, help=u"""The [OCID] of the VM cluster network.""")
+@cli_util.option('--compartment-id', required=True, help=u"""The [OCID] of the compartment to which the VM cluster network is moving.""")
+@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 is updated or deleted only if the Etag that you provide matches the current Etag value for the resource.""")
+@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED", "WAITING"]), 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 ACCEPTED --wait-for-state WAITING 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 change_vm_cluster_network_compartment(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, vm_cluster_network_id, compartment_id, if_match):
+
+ if isinstance(vm_cluster_network_id, six.string_types) and len(vm_cluster_network_id.strip()) == 0:
+ raise click.UsageError('Parameter --vm-cluster-network-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('datacc', 'baseinfra', ctx)
+ result = client.change_vm_cluster_network_compartment(
+ vm_cluster_network_id=vm_cluster_network_id,
+ change_vm_cluster_network_compartment_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)
+
+
+@vm_instance_group.command(name=cli_util.override('datacc.change_vm_instance_compartment.command_name', 'change-compartment'), help=u"""Change the VM instance on Database Infrastructure Compartment to the specified [OCID]. \n[Command Reference](changeVmInstanceCompartment)""")
+@cli_util.option('--vm-instance-id', required=True, help=u"""The [OCID] of the VM instance.""")
+@cli_util.option('--compartment-id', required=True, help=u"""The [OCID] of the compartment to which the VM instance is moving.""")
+@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 is updated or deleted only if the Etag that you provide matches the current Etag value for the resource.""")
+@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED", "WAITING"]), 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 ACCEPTED --wait-for-state WAITING 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 change_vm_instance_compartment(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, vm_instance_id, compartment_id, if_match):
+
+ if isinstance(vm_instance_id, six.string_types) and len(vm_instance_id.strip()) == 0:
+ raise click.UsageError('Parameter --vm-instance-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('datacc', 'baseinfra', ctx)
+ result = client.change_vm_instance_compartment(
+ vm_instance_id=vm_instance_id,
+ change_vm_instance_compartment_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)
+
+
+@infrastructure_group.command(name=cli_util.override('datacc.create_infrastructure.command_name', 'create'), help=u"""Create a Database Infrastructure using the specified details. \n[Command Reference](createInfrastructure)""")
+@cli_util.option('--compartment-id', required=True, help=u"""The [OCID] of the compartment.""")
+@cli_util.option('--display-name', required=True, help=u"""The user-friendly name for the Database Infrastructure. The name does not need to be unique.""")
+@cli_util.option('--system-model', required=True, type=custom_types.CliCaseInsensitiveChoice(["X11_HA_768", "X10_HA_512", "X8_HA_384"]), help=u"""Database Infrastructure System Model specification. The system model determines the model of the Database Infrastructure hardware to be used.""")
+@cli_util.option('--shape', required=True, type=custom_types.CliCaseInsensitiveChoice(["SIX_SSDS", "TWELVE_SSDS", "EIGHTEEN_SSDS", "TWENTY_FOUR_SSDS"]), help=u"""The shape of the Database Infrastructure. The shape determines the amount of CPU, storage, and memory resources allocated to the instance.""")
+@cli_util.option('--cloud-control-plane-server1', required=True, help=u"""The IP address for the first control plane server.""")
+@cli_util.option('--cloud-control-plane-server2', required=True, help=u"""The IP address for the second control plane server.""")
+@cli_util.option('--netmask', required=True, help=u"""The netmask for the control plane network.""")
+@cli_util.option('--gateway', required=True, help=u"""The gateway for the control plane network.""")
+@cli_util.option('--dns-servers', required=True, type=custom_types.CLI_COMPLEX_TYPE, help=u"""The list of DNS server IP addresses. Maximum of 3 allowed.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
+@cli_util.option('--ntp-servers', required=True, type=custom_types.CLI_COMPLEX_TYPE, help=u"""The list of NTP server IP addresses. Maximum of 3 allowed.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
+@cli_util.option('--description', help=u"""Database Infrastructure description.""")
+@cli_util.option('--admin-networkcidr', help=u"""The CIDR block for the system network. The system network is a private network in Database Infrastructure and is not connected to your corporate network. The system network is used for storage (ASM) traffic, high-performance interconnect traffic and administration of infrastructure components.""")
+@cli_util.option('--data-disk-percentage', type=click.INT, help=u"""Percentage of disk space assigned for DATA disk group. Remaining disk space will get assiged to RECO disk group""")
+@cli_util.option('--contacts', type=custom_types.CLI_COMPLEX_TYPE, help=u"""The list of contacts for the Database Infrastructure.
+
+This option is a JSON list with items of type InfrastructureContact. For documentation on InfrastructureContact please see our API reference: https://docs.oracle.com/en-us/iaas/api/#/en/baseinfra/20251101/datatypes/InfrastructureContact.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
+@cli_util.option('--client-bond-mode', type=custom_types.CliCaseInsensitiveChoice(["ACTIVE_BACKUP", "LACP"]), help=u"""The network bonding mode for Client networks for the Database Infrastructure.""")
+@cli_util.option('--backup-bond-mode', type=custom_types.CliCaseInsensitiveChoice(["ACTIVE_BACKUP", "LACP"]), help=u"""The network bonding mode for Backup networks for the Database Infrastructure.""")
+@cli_util.option('--cps-bond-mode', type=custom_types.CliCaseInsensitiveChoice(["ACTIVE_BACKUP", "LACP"]), help=u"""The network bonding mode for CPS networks for the Database Infrastructure.""")
+@cli_util.option('--client-bond-iface', type=custom_types.CliCaseInsensitiveChoice(["BTBOND1", "BTBOND2", "BTBOND3", "BTBOND4", "BTBOND5", "BTBOND6"]), help=u"""The network bonding interface for client network for the Database Infrastructure.""")
+@cli_util.option('--backup-bond-iface', type=custom_types.CliCaseInsensitiveChoice(["BTBOND1", "BTBOND2", "BTBOND3", "BTBOND4", "BTBOND5", "BTBOND6"]), help=u"""The network bonding interface for backup network for the Database Infrastructure.""")
+@cli_util.option('--cps-bond-iface', type=custom_types.CliCaseInsensitiveChoice(["BTBOND1", "BTBOND2", "BTBOND3", "BTBOND4", "BTBOND5", "BTBOND6"]), help=u"""The network bonding interface for CPS network for the Database Infrastructure.""")
+@cli_util.option('--acfs-size-in-gbs', help=u"""The amount of storage (in GB) in the DATA disk group that is reserved for creating local storage for VM Clusters and application VMs.""")
+@cli_util.option('--corporate-proxy', help=u"""The corporate network proxy for access to the control plane network. Oracle recommends using an HTTPS proxy when possible for enhanced security.""")
+@cli_util.option('--vlan-id', help=u"""The CPS network VLAN ID.""")
+@cli_util.option('--maintenance-window', type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
+@cli_util.option('--freeform-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Simple key-value pair that is applied without any predefined name, type or scope. This tag option exists for cross-compatibility only. Example: `{\"bar-key\": \"value\"}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
+@cli_util.option('--defined-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
+@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED", "WAITING"]), 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 ACCEPTED --wait-for-state WAITING 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({'contacts': {'module': 'datacc', 'class': 'list[InfrastructureContact]'}, 'dns-servers': {'module': 'datacc', 'class': 'list[string]'}, 'ntp-servers': {'module': 'datacc', 'class': 'list[string]'}, 'maintenance-window': {'module': 'datacc', 'class': 'MaintenanceWindow'}, 'freeform-tags': {'module': 'datacc', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'datacc', 'class': 'dict(str, dict(str, object))'}})
+@cli_util.help_option
+@click.pass_context
+@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'contacts': {'module': 'datacc', 'class': 'list[InfrastructureContact]'}, 'dns-servers': {'module': 'datacc', 'class': 'list[string]'}, 'ntp-servers': {'module': 'datacc', 'class': 'list[string]'}, 'maintenance-window': {'module': 'datacc', 'class': 'MaintenanceWindow'}, 'freeform-tags': {'module': 'datacc', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'datacc', 'class': 'dict(str, dict(str, object))'}}, output_type={'module': 'datacc', 'class': 'Infrastructure'})
+@cli_util.wrap_exceptions
+def create_infrastructure(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, compartment_id, display_name, system_model, shape, cloud_control_plane_server1, cloud_control_plane_server2, netmask, gateway, dns_servers, ntp_servers, description, admin_networkcidr, data_disk_percentage, contacts, client_bond_mode, backup_bond_mode, cps_bond_mode, client_bond_iface, backup_bond_iface, cps_bond_iface, acfs_size_in_gbs, corporate_proxy, vlan_id, maintenance_window, freeform_tags, defined_tags):
+
+ kwargs = {}
+ kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
+
+ _details = {}
+ _details['compartmentId'] = compartment_id
+ _details['displayName'] = display_name
+ _details['systemModel'] = system_model
+ _details['shape'] = shape
+ _details['cloudControlPlaneServer1'] = cloud_control_plane_server1
+ _details['cloudControlPlaneServer2'] = cloud_control_plane_server2
+ _details['netmask'] = netmask
+ _details['gateway'] = gateway
+ _details['dnsServers'] = cli_util.parse_json_parameter("dns_servers", dns_servers)
+ _details['ntpServers'] = cli_util.parse_json_parameter("ntp_servers", ntp_servers)
+
+ if description is not None:
+ _details['description'] = description
+
+ if admin_networkcidr is not None:
+ _details['adminNetworkcidr'] = admin_networkcidr
+
+ if data_disk_percentage is not None:
+ _details['dataDiskPercentage'] = data_disk_percentage
+
+ if contacts is not None:
+ _details['contacts'] = cli_util.parse_json_parameter("contacts", contacts)
+
+ if client_bond_mode is not None:
+ _details['clientNetworkBondingMode'] = client_bond_mode
+
+ if backup_bond_mode is not None:
+ _details['backupNetworkBondingMode'] = backup_bond_mode
+
+ if cps_bond_mode is not None:
+ _details['cpsNetworkBondingMode'] = cps_bond_mode
+
+ if client_bond_iface is not None:
+ _details['clientNetworkBondingInterface'] = client_bond_iface
+
+ if backup_bond_iface is not None:
+ _details['backupNetworkBondingInterface'] = backup_bond_iface
+
+ if cps_bond_iface is not None:
+ _details['cpsNetworkBondingInterface'] = cps_bond_iface
+
+ if acfs_size_in_gbs is not None:
+ _details['acfsFileSystemStorageInGbs'] = acfs_size_in_gbs
+
+ if corporate_proxy is not None:
+ _details['corporateProxy'] = corporate_proxy
+
+ if vlan_id is not None:
+ _details['vlanId'] = vlan_id
+
+ if maintenance_window is not None:
+ _details['maintenanceWindow'] = cli_util.parse_json_parameter("maintenance_window", maintenance_window)
+
+ if freeform_tags is not None:
+ _details['freeformTags'] = cli_util.parse_json_parameter("freeform_tags", freeform_tags)
+
+ if defined_tags is not None:
+ _details['definedTags'] = cli_util.parse_json_parameter("defined_tags", defined_tags)
+
+ client = cli_util.build_client('datacc', 'baseinfra', ctx)
+ result = client.create_infrastructure(
+ create_infrastructure_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)
+
+
+@vm_cluster_network_group.command(name=cli_util.override('datacc.create_vm_cluster_network.command_name', 'create'), help=u"""Create an VM cluster on Database Infrastructure network using the specified details. \n[Command Reference](createVmClusterNetwork)""")
+@cli_util.option('--compartment-id', required=True, help=u"""The [OCID] of the compartment containing the VM cluster network.""")
+@cli_util.option('--infrastructure-id', required=True, help=u"""The [OCID] of the Database Infrastructure.""")
+@cli_util.option('--display-name', required=True, help=u"""The user-friendly name for the VM cluster network. The name does not need to be unique.""")
+@cli_util.option('--vm-networks', required=True, type=custom_types.CLI_COMPLEX_TYPE, help=u"""Details of the client and backup networks.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
+@cli_util.option('--node-count', type=click.INT, help=u"""Count of virtual machines in this VM cluster.""")
+@cli_util.option('--scans', type=custom_types.CLI_COMPLEX_TYPE, help=u"""The SCAN details.
+
+This option is a JSON list with items of type ScanDetails. For documentation on ScanDetails please see our API reference: https://docs.oracle.com/en-us/iaas/api/#/en/baseinfra/20251101/datatypes/ScanDetails.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
+@cli_util.option('--listener-port', type=click.INT, help=u"""The listener TCP/IP port.""")
+@cli_util.option('--listener-port-ssl', type=click.INT, help=u"""The listener TCP/IP SSL port. Default is 2484.""")
+@cli_util.option('--dns-servers', type=custom_types.CLI_COMPLEX_TYPE, help=u"""The list of DNS server IP addresses. Maximum of 3 allowed.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
+@cli_util.option('--ntp-servers', type=custom_types.CLI_COMPLEX_TYPE, help=u"""The list of NTP server IP addresses. Maximum of 3 allowed.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
+@cli_util.option('--consumer-type', type=custom_types.CliCaseInsensitiveChoice(["INSTANCE", "CLUSTER"]), help=u"""Consumer type for the VM cluster network.""")
+@cli_util.option('--freeform-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Simple key-value pair that is applied without any predefined name, type or scope. This tag option exists for cross-compatibility only. Example: `{\"bar-key\": \"value\"}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
+@cli_util.option('--defined-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
+@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED", "WAITING"]), 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 ACCEPTED --wait-for-state WAITING 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({'scans': {'module': 'datacc', 'class': 'list[ScanDetails]'}, 'dns-servers': {'module': 'datacc', 'class': 'list[string]'}, 'ntp-servers': {'module': 'datacc', 'class': 'list[string]'}, 'vm-networks': {'module': 'datacc', 'class': 'list[VmNetworkDetails]'}, 'freeform-tags': {'module': 'datacc', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'datacc', 'class': 'dict(str, dict(str, object))'}})
+@cli_util.help_option
+@click.pass_context
+@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'scans': {'module': 'datacc', 'class': 'list[ScanDetails]'}, 'dns-servers': {'module': 'datacc', 'class': 'list[string]'}, 'ntp-servers': {'module': 'datacc', 'class': 'list[string]'}, 'vm-networks': {'module': 'datacc', 'class': 'list[VmNetworkDetails]'}, 'freeform-tags': {'module': 'datacc', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'datacc', 'class': 'dict(str, dict(str, object))'}}, output_type={'module': 'datacc', 'class': 'VmClusterNetwork'})
+@cli_util.wrap_exceptions
+def create_vm_cluster_network(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, compartment_id, infrastructure_id, display_name, vm_networks, node_count, scans, listener_port, listener_port_ssl, dns_servers, ntp_servers, consumer_type, freeform_tags, defined_tags):
+
+ kwargs = {}
+ kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
+
+ _details = {}
+ _details['compartmentId'] = compartment_id
+ _details['infrastructureId'] = infrastructure_id
+ _details['displayName'] = display_name
+ _details['vmNetworks'] = cli_util.parse_json_parameter("vm_networks", vm_networks)
+
+ if node_count is not None:
+ _details['nodeCount'] = node_count
+
+ if scans is not None:
+ _details['scans'] = cli_util.parse_json_parameter("scans", scans)
+
+ if listener_port is not None:
+ _details['listenerPort'] = listener_port
+
+ if listener_port_ssl is not None:
+ _details['listenerPortSsl'] = listener_port_ssl
+
+ if dns_servers is not None:
+ _details['dnsServers'] = cli_util.parse_json_parameter("dns_servers", dns_servers)
+
+ if ntp_servers is not None:
+ _details['ntpServers'] = cli_util.parse_json_parameter("ntp_servers", ntp_servers)
+
+ if consumer_type is not None:
+ _details['consumerType'] = consumer_type
+
+ if freeform_tags is not None:
+ _details['freeformTags'] = cli_util.parse_json_parameter("freeform_tags", freeform_tags)
+
+ if defined_tags is not None:
+ _details['definedTags'] = cli_util.parse_json_parameter("defined_tags", defined_tags)
+
+ client = cli_util.build_client('datacc', 'baseinfra', ctx)
+ result = client.create_vm_cluster_network(
+ create_vm_cluster_network_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)
+
+
+@vm_instance_group.command(name=cli_util.override('datacc.create_vm_instance.command_name', 'create'), help=u"""Create an VM instance on Database Infrastructure using the specified details. \n[Command Reference](createVmInstance)""")
+@cli_util.option('--compartment-id', required=True, help=u"""The [OCID] of the compartment containing the VM instance.""")
+@cli_util.option('--infrastructure-id', required=True, help=u"""The [OCID] of the Database Infrastructure.""")
+@cli_util.option('--cpus-enabled', required=True, type=click.INT, help=u"""The number of CPU cores enabled for each VM instance.""")
+@cli_util.option('--ssh-public-keys', required=True, type=custom_types.CLI_COMPLEX_TYPE, help=u"""List of public key used for SSH access to the VM instance.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
+@cli_util.option('--display-name', help=u"""VM instance display name. This name does not have to be unique, and is changeable.""")
+@cli_util.option('--description', help=u"""VM instance description.""")
+@cli_util.option('--memory-size-in-gbs', help=u"""The memory to be allocated in GBs.""")
+@cli_util.option('--boot-storage-size-in-gbs', help=u"""Boot storage memory to be allocated in GBs.""")
+@cli_util.option('--data-storage-size-in-gbs', help=u"""Data storage to be allocated in GBs.""")
+@cli_util.option('--image-id', help=u"""The [OCID] of the VM custom instance uploaded.""")
+@cli_util.option('--server-id', help=u"""The [OCID] of the compute node on which VM instance should be launched.""")
+@cli_util.option('--domain-name', help=u"""The domain name of the VM instance.""")
+@cli_util.option('--time-zone', help=u"""The time zone to use for the VM instance.""")
+@cli_util.option('--dns-servers', type=custom_types.CLI_COMPLEX_TYPE, help=u"""The list of DNS server IP addresses. Maximum of 3 allowed.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
+@cli_util.option('--ntp-servers', type=custom_types.CLI_COMPLEX_TYPE, help=u"""The list of NTP server IP addresses. Maximum of 3 allowed.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
+@cli_util.option('--hostname', help=u"""The host name of the instance.""")
+@cli_util.option('--ip-address', help=u"""The IP address of the instance.""")
+@cli_util.option('--netmask', help=u"""The netmask of the VM instance network.""")
+@cli_util.option('--gateway', help=u"""The gateway IP address of the VM instance network""")
+@cli_util.option('--vlan-id', help=u"""The network VLAN ID.""")
+@cli_util.option('--userdata', help=u"""Base64-encoded data to be used by Cloud-Init to run custom scripts or provide custom Cloud-Init configuration. For information about how to take advantage of user data, see the [Cloud-Init Documentation].""")
+@cli_util.option('--metadata', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Custom metadata key/value pairs which can be used to: - Provide information to [Cloud-Init] to be used for various system initialization tasks. - Provide additional information which is exposed inside the instance context and can be queried or referenced by user-data scripts for dynamic configuration.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
+@cli_util.option('--vm-network-id', help=u"""The [OCID] of the VM Network.""")
+@cli_util.option('--defined-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
+@cli_util.option('--freeform-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Simple key-value pair that is applied without any predefined name, type or scope. This tag option exists for cross-compatibility only. Example: `{\"bar-key\": \"value\"}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
+@cli_util.option('--system-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Usage of system tag keys. These predefined keys are scoped to namespaces. Example: `{ \"orcl-cloud\": { \"free-tier-retained\": \"true\" } }`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
+@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED", "WAITING"]), 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 ACCEPTED --wait-for-state WAITING 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({'ssh-public-keys': {'module': 'datacc', 'class': 'list[string]'}, 'dns-servers': {'module': 'datacc', 'class': 'list[string]'}, 'ntp-servers': {'module': 'datacc', 'class': 'list[string]'}, 'metadata': {'module': 'datacc', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'datacc', 'class': 'dict(str, dict(str, object))'}, 'freeform-tags': {'module': 'datacc', 'class': 'dict(str, string)'}, 'system-tags': {'module': 'datacc', 'class': 'dict(str, dict(str, object))'}})
+@cli_util.help_option
+@click.pass_context
+@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'ssh-public-keys': {'module': 'datacc', 'class': 'list[string]'}, 'dns-servers': {'module': 'datacc', 'class': 'list[string]'}, 'ntp-servers': {'module': 'datacc', 'class': 'list[string]'}, 'metadata': {'module': 'datacc', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'datacc', 'class': 'dict(str, dict(str, object))'}, 'freeform-tags': {'module': 'datacc', 'class': 'dict(str, string)'}, 'system-tags': {'module': 'datacc', 'class': 'dict(str, dict(str, object))'}}, output_type={'module': 'datacc', 'class': 'VmInstance'})
+@cli_util.wrap_exceptions
+def create_vm_instance(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, compartment_id, infrastructure_id, cpus_enabled, ssh_public_keys, display_name, description, memory_size_in_gbs, boot_storage_size_in_gbs, data_storage_size_in_gbs, image_id, server_id, domain_name, time_zone, dns_servers, ntp_servers, hostname, ip_address, netmask, gateway, vlan_id, userdata, metadata, vm_network_id, defined_tags, freeform_tags, system_tags):
+
+ kwargs = {}
+ kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
+
+ _details = {}
+ _details['compartmentId'] = compartment_id
+ _details['infrastructureId'] = infrastructure_id
+ _details['cpusEnabled'] = cpus_enabled
+ _details['sshPublicKeys'] = cli_util.parse_json_parameter("ssh_public_keys", ssh_public_keys)
+
+ if display_name is not None:
+ _details['displayName'] = display_name
+
+ if description is not None:
+ _details['description'] = description
+
+ if memory_size_in_gbs is not None:
+ _details['memorySizeInGBs'] = memory_size_in_gbs
+
+ if boot_storage_size_in_gbs is not None:
+ _details['bootStorageSizeInGBs'] = boot_storage_size_in_gbs
+
+ if data_storage_size_in_gbs is not None:
+ _details['dataStorageSizeInGBs'] = data_storage_size_in_gbs
+
+ if image_id is not None:
+ _details['imageId'] = image_id
+
+ if server_id is not None:
+ _details['serverId'] = server_id
+
+ if domain_name is not None:
+ _details['domainName'] = domain_name
+
+ if time_zone is not None:
+ _details['timeZone'] = time_zone
+
+ if dns_servers is not None:
+ _details['dnsServers'] = cli_util.parse_json_parameter("dns_servers", dns_servers)
+
+ if ntp_servers is not None:
+ _details['ntpServers'] = cli_util.parse_json_parameter("ntp_servers", ntp_servers)
+
+ if hostname is not None:
+ _details['hostname'] = hostname
+
+ if ip_address is not None:
+ _details['ipAddress'] = ip_address
+
+ if netmask is not None:
+ _details['netmask'] = netmask
+
+ if gateway is not None:
+ _details['gateway'] = gateway
+
+ if vlan_id is not None:
+ _details['vlanId'] = vlan_id
+
+ if userdata is not None:
+ _details['userdata'] = userdata
+
+ if metadata is not None:
+ _details['metadata'] = cli_util.parse_json_parameter("metadata", metadata)
+
+ if vm_network_id is not None:
+ _details['vmNetworkId'] = vm_network_id
+
+ if defined_tags is not None:
+ _details['definedTags'] = cli_util.parse_json_parameter("defined_tags", defined_tags)
+
+ if freeform_tags is not None:
+ _details['freeformTags'] = cli_util.parse_json_parameter("freeform_tags", freeform_tags)
+
+ if system_tags is not None:
+ _details['systemTags'] = cli_util.parse_json_parameter("system_tags", system_tags)
+
+ client = cli_util.build_client('datacc', 'baseinfra', ctx)
+ result = client.create_vm_instance(
+ create_vm_instance_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)
+
+
+@infrastructure_group.command(name=cli_util.override('datacc.delete_infrastructure.command_name', 'delete'), help=u"""Delete the Database Infrastructure that has the specified [OCID]. It must be called once the resource usage is complete. \n[Command Reference](deleteInfrastructure)""")
+@cli_util.option('--infrastructure-id', required=True, help=u"""The [OCID] of the Database Infrastructure.""")
+@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 is updated or deleted only if the Etag that you provide matches the current Etag value for the resource.""")
+@cli_util.option('--is-force-delete', type=click.BOOL, help=u"""When set to `true`, infrastructure will be deleted even if it has dependent resources. If set to `false`, deletion will fail if the infrastructure has dependent resources. Default is `false`.""")
+@cli_util.confirm_delete_option
+@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED", "WAITING"]), 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 ACCEPTED --wait-for-state WAITING 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_infrastructure(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, infrastructure_id, if_match, is_force_delete):
+
+ if isinstance(infrastructure_id, six.string_types) and len(infrastructure_id.strip()) == 0:
+ raise click.UsageError('Parameter --infrastructure-id cannot be whitespace or empty string')
+
+ kwargs = {}
+ if if_match is not None:
+ kwargs['if_match'] = if_match
+ if is_force_delete is not None:
+ kwargs['is_force_delete_infrastructure'] = is_force_delete
+ kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
+ client = cli_util.build_client('datacc', 'baseinfra', ctx)
+ result = client.delete_infrastructure(
+ infrastructure_id=infrastructure_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)
+
+
+@vm_cluster_network_group.command(name=cli_util.override('datacc.delete_vm_cluster_network.command_name', 'delete'), help=u"""Delete the VM cluster network on Database Infrastructure that has the specified [OCID]. It must be called once the resource usage is complete. \n[Command Reference](deleteVmClusterNetwork)""")
+@cli_util.option('--vm-cluster-network-id', required=True, help=u"""The [OCID] of the VM cluster network.""")
+@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 is updated or deleted only if the Etag that you provide matches the current Etag value for the resource.""")
+@cli_util.confirm_delete_option
+@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED", "WAITING"]), 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 ACCEPTED --wait-for-state WAITING 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_vm_cluster_network(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, vm_cluster_network_id, if_match):
+
+ if isinstance(vm_cluster_network_id, six.string_types) and len(vm_cluster_network_id.strip()) == 0:
+ raise click.UsageError('Parameter --vm-cluster-network-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('datacc', 'baseinfra', ctx)
+ result = client.delete_vm_cluster_network(
+ vm_cluster_network_id=vm_cluster_network_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)
+
+
+@vm_instance_group.command(name=cli_util.override('datacc.delete_vm_instance.command_name', 'delete'), help=u"""Delete the VM instance on Database Infrastructure that has the specified [OCID]. It must be called once the resource usage is complete. \n[Command Reference](deleteVmInstance)""")
+@cli_util.option('--vm-instance-id', required=True, help=u"""The [OCID] of the VM instance.""")
+@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 is updated or deleted only if the Etag that you provide matches the current Etag value for the resource.""")
+@cli_util.confirm_delete_option
+@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED", "WAITING"]), 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 ACCEPTED --wait-for-state WAITING 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_vm_instance(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, vm_instance_id, if_match):
+
+ if isinstance(vm_instance_id, six.string_types) and len(vm_instance_id.strip()) == 0:
+ raise click.UsageError('Parameter --vm-instance-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('datacc', 'baseinfra', ctx)
+ result = client.delete_vm_instance(
+ vm_instance_id=vm_instance_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)
+
+
+@infrastructure_group.command(name=cli_util.override('datacc.download_infrastructure_config_file.command_name', 'download-config-file'), help=u"""Downloads the configuration file for the specified Database Infrastructure Cloud@Customer. \n[Command Reference](downloadInfrastructureConfigFile)""")
+@cli_util.option('--infrastructure-id', required=True, help=u"""The [OCID] of the Database Infrastructure.""")
+@cli_util.option('--file', type=click.File(mode='wb'), required=True, help="The name of the file that will receive the response data, or '-' to write to STDOUT.")
+@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 download_infrastructure_config_file(ctx, from_json, file, infrastructure_id):
+
+ if isinstance(infrastructure_id, six.string_types) and len(infrastructure_id.strip()) == 0:
+ raise click.UsageError('Parameter --infrastructure-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('datacc', 'baseinfra', ctx)
+ result = client.download_infrastructure_config_file(
+ infrastructure_id=infrastructure_id,
+ **kwargs
+ )
+
+ # If outputting to stdout we don't want to print a progress bar because it will get mixed up with the output
+ # Also we need a non-zero Content-Length in order to display a meaningful progress bar
+ bar = None
+ if hasattr(file, 'name') and file.name != '' and 'Content-Length' in result.headers:
+ content_length = int(result.headers['Content-Length'])
+ if content_length > 0:
+ bar = click.progressbar(length=content_length, label='Downloading file')
+
+ try:
+ if bar:
+ bar.__enter__()
+
+ # TODO: Make the download size a configurable option
+ # use decode_content=True to automatically unzip service responses (this should be overridden for object storage)
+ for chunk in result.data.raw.stream(cli_constants.MEBIBYTE, decode_content=True):
+ if bar:
+ bar.update(len(chunk))
+ file.write(chunk)
+ finally:
+ if bar:
+ bar.render_finish()
+ file.close()
+
+
+@infrastructure_group.command(name=cli_util.override('datacc.download_infrastructure_validation_script.command_name', 'download-validation-script'), help=u"""Downloads the validation script for the specified Database Infrastructure Cloud@Customer. \n[Command Reference](downloadInfrastructureValidationScript)""")
+@cli_util.option('--infrastructure-id', required=True, help=u"""The [OCID] of the Database Infrastructure.""")
+@cli_util.option('--file', type=click.File(mode='wb'), required=True, help="The name of the file that will receive the response data, or '-' to write to STDOUT.")
+@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 download_infrastructure_validation_script(ctx, from_json, file, infrastructure_id):
+
+ if isinstance(infrastructure_id, six.string_types) and len(infrastructure_id.strip()) == 0:
+ raise click.UsageError('Parameter --infrastructure-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('datacc', 'baseinfra', ctx)
+ result = client.download_infrastructure_validation_script(
+ infrastructure_id=infrastructure_id,
+ **kwargs
+ )
+
+ # If outputting to stdout we don't want to print a progress bar because it will get mixed up with the output
+ # Also we need a non-zero Content-Length in order to display a meaningful progress bar
+ bar = None
+ if hasattr(file, 'name') and file.name != '' and 'Content-Length' in result.headers:
+ content_length = int(result.headers['Content-Length'])
+ if content_length > 0:
+ bar = click.progressbar(length=content_length, label='Downloading file')
+
+ try:
+ if bar:
+ bar.__enter__()
+
+ # TODO: Make the download size a configurable option
+ # use decode_content=True to automatically unzip service responses (this should be overridden for object storage)
+ for chunk in result.data.raw.stream(cli_constants.MEBIBYTE, decode_content=True):
+ if bar:
+ bar.update(len(chunk))
+ file.write(chunk)
+ finally:
+ if bar:
+ bar.render_finish()
+ file.close()
+
+
+@vm_cluster_network_group.command(name=cli_util.override('datacc.generate_recommended_vm_cluster_network.command_name', 'generate-recommended'), help=u"""Generates an VM cluster network configuration using the specified details. \n[Command Reference](generateRecommendedVmClusterNetwork)""")
+@cli_util.option('--infrastructure-id', required=True, help=u"""The [OCID] of the Database Infrastructure.""")
+@cli_util.option('--compartment-id', required=True, help=u"""The [OCID] of the compartment containing the VM cluster network.""")
+@cli_util.option('--display-name', required=True, help=u"""The user-friendly name for the VM cluster network. The name does not need to be unique.""")
+@cli_util.option('--vm-networks', required=True, type=custom_types.CLI_COMPLEX_TYPE, help=u"""Details of the client and backup networks.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
+@cli_util.option('--node-count', type=click.INT, help=u"""Count of virtual machines in this VM cluster.""")
+@cli_util.option('--listener-port', type=click.INT, help=u"""The listener TCP/IP port.""")
+@cli_util.option('--listener-port-ssl', type=click.INT, help=u"""The listener TCP/IP SSL port. Default is 2484.""")
+@cli_util.option('--dns-servers', type=custom_types.CLI_COMPLEX_TYPE, help=u"""The list of DNS server IP addresses. Maximum of 3 allowed.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
+@cli_util.option('--ntp-servers', type=custom_types.CLI_COMPLEX_TYPE, help=u"""The list of NTP server IP addresses. Maximum of 3 allowed.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
+@cli_util.option('--defined-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
+@cli_util.option('--freeform-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Simple key-value pair that is applied without any predefined name, type or scope. This tag option exists for cross-compatibility only. Example: `{\"bar-key\": \"value\"}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
+@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 is updated or deleted only if the Etag that you provide matches the current Etag value for the resource.""")
+@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED", "WAITING"]), 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 ACCEPTED --wait-for-state WAITING 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({'vm-networks': {'module': 'datacc', 'class': 'list[InfoVmNetworkDetails]'}, 'dns-servers': {'module': 'datacc', 'class': 'list[string]'}, 'ntp-servers': {'module': 'datacc', 'class': 'list[string]'}, 'defined-tags': {'module': 'datacc', 'class': 'dict(str, dict(str, object))'}, 'freeform-tags': {'module': 'datacc', 'class': 'dict(str, string)'}})
+@cli_util.help_option
+@click.pass_context
+@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'vm-networks': {'module': 'datacc', 'class': 'list[InfoVmNetworkDetails]'}, 'dns-servers': {'module': 'datacc', 'class': 'list[string]'}, 'ntp-servers': {'module': 'datacc', 'class': 'list[string]'}, 'defined-tags': {'module': 'datacc', 'class': 'dict(str, dict(str, object))'}, 'freeform-tags': {'module': 'datacc', 'class': 'dict(str, string)'}}, output_type={'module': 'datacc', 'class': 'CreateVmClusterNetworkDetails'})
+@cli_util.wrap_exceptions
+def generate_recommended_vm_cluster_network(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, infrastructure_id, compartment_id, display_name, vm_networks, node_count, listener_port, listener_port_ssl, dns_servers, ntp_servers, defined_tags, freeform_tags, if_match):
+
+ 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['infrastructureId'] = infrastructure_id
+ _details['compartmentId'] = compartment_id
+ _details['displayName'] = display_name
+ _details['vmNetworks'] = cli_util.parse_json_parameter("vm_networks", vm_networks)
+
+ if node_count is not None:
+ _details['nodeCount'] = node_count
+
+ if listener_port is not None:
+ _details['listenerPort'] = listener_port
+
+ if listener_port_ssl is not None:
+ _details['listenerPortSsl'] = listener_port_ssl
+
+ if dns_servers is not None:
+ _details['dnsServers'] = cli_util.parse_json_parameter("dns_servers", dns_servers)
+
+ if ntp_servers is not None:
+ _details['ntpServers'] = cli_util.parse_json_parameter("ntp_servers", ntp_servers)
+
+ if defined_tags is not None:
+ _details['definedTags'] = cli_util.parse_json_parameter("defined_tags", defined_tags)
+
+ if freeform_tags is not None:
+ _details['freeformTags'] = cli_util.parse_json_parameter("freeform_tags", freeform_tags)
+
+ client = cli_util.build_client('datacc', 'baseinfra', ctx)
+ result = client.generate_recommended_vm_cluster_network(
+ generate_recommended_vm_cluster_network_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)
+
+
+@infrastructure_group.command(name=cli_util.override('datacc.get_infrastructure.command_name', 'get'), help=u"""Obtain the Database Infrastructure that has the specified [OCID]. \n[Command Reference](getInfrastructure)""")
+@cli_util.option('--infrastructure-id', required=True, help=u"""The [OCID] of the Database Infrastructure.""")
+@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': 'datacc', 'class': 'Infrastructure'})
+@cli_util.wrap_exceptions
+def get_infrastructure(ctx, from_json, infrastructure_id):
+
+ if isinstance(infrastructure_id, six.string_types) and len(infrastructure_id.strip()) == 0:
+ raise click.UsageError('Parameter --infrastructure-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('datacc', 'baseinfra', ctx)
+ result = client.get_infrastructure(
+ infrastructure_id=infrastructure_id,
+ **kwargs
+ )
+ cli_util.render_response(result, ctx)
+
+
+@infrastructure_scale_option_group.command(name=cli_util.override('datacc.get_infrastructure_scale_option.command_name', 'get'), help=u"""Get the available scale options for the infrastructure that has the specified [OCID]. \n[Command Reference](getInfrastructureScaleOption)""")
+@cli_util.option('--infrastructure-id', required=True, help=u"""The [OCID] of the Database Infrastructure.""")
+@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': 'datacc', 'class': 'InfrastructureScaleOption'})
+@cli_util.wrap_exceptions
+def get_infrastructure_scale_option(ctx, from_json, infrastructure_id):
+
+ if isinstance(infrastructure_id, six.string_types) and len(infrastructure_id.strip()) == 0:
+ raise click.UsageError('Parameter --infrastructure-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('datacc', 'baseinfra', ctx)
+ result = client.get_infrastructure_scale_option(
+ infrastructure_id=infrastructure_id,
+ **kwargs
+ )
+ cli_util.render_response(result, ctx)
+
+
+@maintenance_execution_group.command(name=cli_util.override('datacc.get_maintenance_execution.command_name', 'get'), help=u"""Gets information about the specified [OCID]. \n[Command Reference](getMaintenanceExecution)""")
+@cli_util.option('--maintenance-execution-id', required=True, help=u"""The maintenance execution OCID.""")
+@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': 'datacc', 'class': 'MaintenanceExecution'})
+@cli_util.wrap_exceptions
+def get_maintenance_execution(ctx, from_json, maintenance_execution_id):
+
+ if isinstance(maintenance_execution_id, six.string_types) and len(maintenance_execution_id.strip()) == 0:
+ raise click.UsageError('Parameter --maintenance-execution-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('datacc', 'baseinfra', ctx)
+ result = client.get_maintenance_execution(
+ maintenance_execution_id=maintenance_execution_id,
+ **kwargs
+ )
+ cli_util.render_response(result, ctx)
+
+
+@maintenance_run_group.command(name=cli_util.override('datacc.get_maintenance_run.command_name', 'get'), help=u"""Gets information about the specified [OCID]. \n[Command Reference](getMaintenanceRun)""")
+@cli_util.option('--maintenance-run-id', required=True, help=u"""The maintenance run OCID.""")
+@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': 'datacc', 'class': 'MaintenanceRun'})
+@cli_util.wrap_exceptions
+def get_maintenance_run(ctx, from_json, maintenance_run_id):
+
+ if isinstance(maintenance_run_id, six.string_types) and len(maintenance_run_id.strip()) == 0:
+ raise click.UsageError('Parameter --maintenance-run-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('datacc', 'baseinfra', ctx)
+ result = client.get_maintenance_run(
+ maintenance_run_id=maintenance_run_id,
+ **kwargs
+ )
+ cli_util.render_response(result, ctx)
+
+
+@vm_cluster_network_group.command(name=cli_util.override('datacc.get_vm_cluster_network.command_name', 'get'), help=u"""Obtain the VM cluster network on Database Infrastructure that has the specified [OCID]. \n[Command Reference](getVmClusterNetwork)""")
+@cli_util.option('--vm-cluster-network-id', required=True, help=u"""The [OCID] of the VM cluster network.""")
+@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': 'datacc', 'class': 'VmClusterNetwork'})
+@cli_util.wrap_exceptions
+def get_vm_cluster_network(ctx, from_json, vm_cluster_network_id):
+
+ if isinstance(vm_cluster_network_id, six.string_types) and len(vm_cluster_network_id.strip()) == 0:
+ raise click.UsageError('Parameter --vm-cluster-network-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('datacc', 'baseinfra', ctx)
+ result = client.get_vm_cluster_network(
+ vm_cluster_network_id=vm_cluster_network_id,
+ **kwargs
+ )
+ cli_util.render_response(result, ctx)
+
+
+@vm_instance_group.command(name=cli_util.override('datacc.get_vm_instance.command_name', 'get'), help=u"""Obtain the VM instance on Database Infrastructure that has the specified [OCID]. \n[Command Reference](getVmInstance)""")
+@cli_util.option('--vm-instance-id', required=True, help=u"""The [OCID] of the VM instance.""")
+@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': 'datacc', 'class': 'VmInstance'})
+@cli_util.wrap_exceptions
+def get_vm_instance(ctx, from_json, vm_instance_id):
+
+ if isinstance(vm_instance_id, six.string_types) and len(vm_instance_id.strip()) == 0:
+ raise click.UsageError('Parameter --vm-instance-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('datacc', 'baseinfra', ctx)
+ result = client.get_vm_instance(
+ vm_instance_id=vm_instance_id,
+ **kwargs
+ )
+ cli_util.render_response(result, ctx)
+
+
+@work_request_group.command(name=cli_util.override('datacc.get_work_request.command_name', 'get'), help=u"""Get the status of the work request having the specified work request [OCID]. \n[Command Reference](getWorkRequest)""")
+@cli_util.option('--work-request-id', required=True, help=u"""The [OCID] of the asynchronous work request.""")
+@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': 'datacc', 'class': 'WorkRequest'})
+@cli_util.wrap_exceptions
+def get_work_request(ctx, from_json, work_request_id):
+
+ if isinstance(work_request_id, six.string_types) and len(work_request_id.strip()) == 0:
+ raise click.UsageError('Parameter --work-request-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('datacc', 'baseinfra', ctx)
+ result = client.get_work_request(
+ work_request_id=work_request_id,
+ **kwargs
+ )
+ cli_util.render_response(result, ctx)
+
+
+@infrastructure_summary_group.command(name=cli_util.override('datacc.list_infrastructures.command_name', 'list'), help=u"""Obtain a list of Database Infrastructures. \n[Command Reference](listInfrastructures)""")
+@cli_util.option('--compartment-id', required=True, help=u"""The [OCID] of the compartment. For list operations, you may provide the tenant [OCID] in this field. When a tenant OCID is provided, it will be validated against the caller's tenant and then treated as tenant scope (compartmentId filtering is not applied).""")
+@cli_util.option('--display-name', help=u"""A filter to return resources that match the entire display name given. The match is case sensitive.""")
+@cli_util.option('--lifecycle-state', type=custom_types.CliCaseInsensitiveChoice(["CREATING", "REQUIRES_VALIDATION", "VALIDATING", "VALIDATION_FAILED", "REQUIRES_ACTIVATION", "ACTIVATING", "ACTIVE", "ACTIVATION_FAILED", "FAILED", "UPDATING", "DELETING", "DELETED", "DISCONNECTED", "MAINTENANCE_IN_PROGRESS"]), multiple=True, help=u"""A filter to return resources that match the specified lifecycle state.""")
+@cli_util.option('--limit', type=click.INT, help=u"""The maximum number of items to return in a page.""")
+@cli_util.option('--page', help=u"""The page token representing the page at which you want to start retrieving results. This token is usually retrieved from a previous list call.""")
+@cli_util.option('--sort-order', type=custom_types.CliCaseInsensitiveChoice(["ASC", "DESC"]), help=u"""The sort order that you want to use, which is either `ASC` or `DESC`.""")
+@cli_util.option('--sort-by', type=custom_types.CliCaseInsensitiveChoice(["timeCreated", "displayName", "buildIdentifier"]), help=u"""The field by which you want to sort. You can provide only one type of sort order. The default order for `timeCreated` is descending. The default order for `displayName` is ascending. If no value is specified, then `timeCreated` is the default. When listing software images within the same `version`, using `sortBy=buildIdentifier` is recommended. `buildIdentifier` is a monotonically increasing, time-ordered string marker (yyyy-mm-dd-hh:mm:ss) stored with the image.""")
+@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': 'datacc', 'class': 'InfrastructureCollection'})
+@cli_util.wrap_exceptions
+def list_infrastructures(ctx, from_json, all_pages, page_size, compartment_id, display_name, lifecycle_state, 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 display_name is not None:
+ kwargs['display_name'] = display_name
+ if lifecycle_state is not None and len(lifecycle_state) > 0:
+ kwargs['lifecycle_state'] = lifecycle_state
+ 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('datacc', 'baseinfra', ctx)
+ if all_pages:
+ if page_size:
+ kwargs['limit'] = page_size
+
+ result = cli_util.list_call_get_all_results(
+ client.list_infrastructures,
+ compartment_id=compartment_id,
+ **kwargs
+ )
+ elif limit is not None:
+ result = cli_util.list_call_get_up_to_limit(
+ client.list_infrastructures,
+ limit,
+ page_size,
+ compartment_id=compartment_id,
+ **kwargs
+ )
+ else:
+ result = client.list_infrastructures(
+ compartment_id=compartment_id,
+ **kwargs
+ )
+ cli_util.render_response(result, ctx)
+
+
+@maintenance_execution_group.command(name=cli_util.override('datacc.list_maintenance_executions.command_name', 'list'), help=u"""Gets a list of the maintenance executions in the specified compartment. \n[Command Reference](listMaintenanceExecutions)""")
+@cli_util.option('--compartment-id', required=True, help=u"""The [OCID] of the compartment. For list operations, you may provide the tenant [OCID] in this field. When a tenant OCID is provided, it will be validated against the caller's tenant and then treated as tenant scope (compartmentId filtering is not applied).""")
+@cli_util.option('--display-name', help=u"""A filter to return resources that match the entire display name given. The match is case sensitive.""")
+@cli_util.option('--infrastructure-id', help=u"""The Database Infrastructure ID.""")
+@cli_util.option('--target-resource-type', type=custom_types.CliCaseInsensitiveChoice(["DB_CC_INFRASTRUCTURE"]), help=u"""The type of the target resource.""")
+@cli_util.option('--maintenance-type', type=custom_types.CliCaseInsensitiveChoice(["PLANNED", "UNPLANNED"]), help=u"""The maintenance type.""")
+@cli_util.option('--maintenance-run-id', help=u"""The maintenance run OCID.""")
+@cli_util.option('--lifecycle-state', type=custom_types.CliCaseInsensitiveChoice(["CREATING", "SCHEDULED", "IN_PROGRESS", "SUCCEEDED", "SKIPPED", "FAILED", "UPDATING", "DELETING", "DELETED", "CANCELED", "PARTIAL_SUCCESS"]), help=u"""A filter to return only resources that match the given lifecycle state exactly.""")
+@cli_util.option('--maintenance-subtype', type=custom_types.CliCaseInsensitiveChoice(["YEARLY", "HALFYEARLY", "QUARTERLY", "MONTHLY", "DAILY", "HARDWARE", "CRITICAL", "INFRA_UPDATE", "CPS_SERVICES_UPDATE", "CPS_VM_UPDATE", "SECURITY_MONTHLY"]), help=u"""The sub-type of the maintenance run.""")
+@cli_util.option('--time-accepted-less-than-or-equal-to', type=custom_types.CLI_DATETIME, help=u"""Filter maintenance run for before given time.""" + custom_types.CLI_DATETIME.VALID_DATETIME_CLI_HELP_MESSAGE)
+@cli_util.option('--time-accepted-greater-than-or-equal-to', type=custom_types.CLI_DATETIME, help=u"""Filter maintenance run for after given time.""" + custom_types.CLI_DATETIME.VALID_DATETIME_CLI_HELP_MESSAGE)
+@cli_util.option('--type', type=custom_types.CliCaseInsensitiveChoice(["NOTIFY", "EXECUTE"]), help=u"""The maintenance execution type.""")
+@cli_util.option('--limit', type=click.INT, help=u"""The maximum number of items to return in a page.""")
+@cli_util.option('--page', help=u"""The page token representing the page at which you want to start retrieving results. This token is usually retrieved from a previous list call.""")
+@cli_util.option('--sort-by', type=custom_types.CliCaseInsensitiveChoice(["timeCreated", "displayName", "buildIdentifier"]), help=u"""The field by which you want to sort. You can provide only one type of sort order. The default order for `timeCreated` is descending. The default order for `displayName` is ascending. If no value is specified, then `timeCreated` is the default. When listing software images within the same `version`, using `sortBy=buildIdentifier` is recommended. `buildIdentifier` is a monotonically increasing, time-ordered string marker (yyyy-mm-dd-hh:mm:ss) stored with the image.""")
+@cli_util.option('--sort-order', type=custom_types.CliCaseInsensitiveChoice(["ASC", "DESC"]), help=u"""The sort order that you want to use, which is either `ASC` or `DESC`.""")
+@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': 'datacc', 'class': 'MaintenanceExecutionCollection'})
+@cli_util.wrap_exceptions
+def list_maintenance_executions(ctx, from_json, all_pages, page_size, compartment_id, display_name, infrastructure_id, target_resource_type, maintenance_type, maintenance_run_id, lifecycle_state, maintenance_subtype, time_accepted_less_than_or_equal_to, time_accepted_greater_than_or_equal_to, type, limit, page, sort_by, sort_order):
+
+ if all_pages and limit:
+ raise click.UsageError('If you provide the --all option you cannot provide the --limit option')
+
+ kwargs = {}
+ if display_name is not None:
+ kwargs['display_name'] = display_name
+ if infrastructure_id is not None:
+ kwargs['infrastructure_id'] = infrastructure_id
+ if target_resource_type is not None:
+ kwargs['target_resource_type'] = target_resource_type
+ if maintenance_type is not None:
+ kwargs['maintenance_type'] = maintenance_type
+ if maintenance_run_id is not None:
+ kwargs['maintenance_run_id'] = maintenance_run_id
+ if lifecycle_state is not None:
+ kwargs['lifecycle_state'] = lifecycle_state
+ if maintenance_subtype is not None:
+ kwargs['maintenance_subtype'] = maintenance_subtype
+ if time_accepted_less_than_or_equal_to is not None:
+ kwargs['time_accepted_less_than_or_equal_to'] = time_accepted_less_than_or_equal_to
+ if time_accepted_greater_than_or_equal_to is not None:
+ kwargs['time_accepted_greater_than_or_equal_to'] = time_accepted_greater_than_or_equal_to
+ if type is not None:
+ kwargs['type'] = type
+ if limit is not None:
+ kwargs['limit'] = limit
+ if page is not None:
+ kwargs['page'] = page
+ if sort_by is not None:
+ kwargs['sort_by'] = sort_by
+ if sort_order is not None:
+ kwargs['sort_order'] = sort_order
+ kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
+ client = cli_util.build_client('datacc', 'baseinfra', ctx)
+ if all_pages:
+ if page_size:
+ kwargs['limit'] = page_size
+
+ result = cli_util.list_call_get_all_results(
+ client.list_maintenance_executions,
+ compartment_id=compartment_id,
+ **kwargs
+ )
+ elif limit is not None:
+ result = cli_util.list_call_get_up_to_limit(
+ client.list_maintenance_executions,
+ limit,
+ page_size,
+ compartment_id=compartment_id,
+ **kwargs
+ )
+ else:
+ result = client.list_maintenance_executions(
+ compartment_id=compartment_id,
+ **kwargs
+ )
+ cli_util.render_response(result, ctx)
+
+
+@maintenance_run_group.command(name=cli_util.override('datacc.list_maintenance_runs.command_name', 'list'), help=u"""Gets a list of the maintenance runs in the specified compartment. \n[Command Reference](listMaintenanceRuns)""")
+@cli_util.option('--compartment-id', required=True, help=u"""The [OCID] of the compartment. For list operations, you may provide the tenant [OCID] in this field. When a tenant OCID is provided, it will be validated against the caller's tenant and then treated as tenant scope (compartmentId filtering is not applied).""")
+@cli_util.option('--display-name', help=u"""A filter to return resources that match the entire display name given. The match is case sensitive.""")
+@cli_util.option('--infrastructure-id', help=u"""The Database Infrastructure ID.""")
+@cli_util.option('--target-resource-type', type=custom_types.CliCaseInsensitiveChoice(["DB_CC_INFRASTRUCTURE"]), help=u"""The type of the target resource.""")
+@cli_util.option('--maintenance-type', type=custom_types.CliCaseInsensitiveChoice(["PLANNED", "UNPLANNED"]), help=u"""The maintenance type.""")
+@cli_util.option('--lifecycle-state', type=custom_types.CliCaseInsensitiveChoice(["CREATING", "SCHEDULED", "IN_PROGRESS", "SUCCEEDED", "SKIPPED", "FAILED", "UPDATING", "DELETING", "DELETED", "CANCELED", "PARTIAL_SUCCESS"]), help=u"""A filter to return only resources that match the given lifecycle state exactly.""")
+@cli_util.option('--maintenance-subtype', type=custom_types.CliCaseInsensitiveChoice(["YEARLY", "HALFYEARLY", "QUARTERLY", "MONTHLY", "DAILY", "HARDWARE", "CRITICAL", "INFRA_UPDATE", "CPS_SERVICES_UPDATE", "CPS_VM_UPDATE", "SECURITY_MONTHLY"]), help=u"""The sub-type of the maintenance run.""")
+@cli_util.option('--time-accepted-less-than-or-equal-to', type=custom_types.CLI_DATETIME, help=u"""Filter maintenance run for before given time.""" + custom_types.CLI_DATETIME.VALID_DATETIME_CLI_HELP_MESSAGE)
+@cli_util.option('--time-accepted-greater-than-or-equal-to', type=custom_types.CLI_DATETIME, help=u"""Filter maintenance run for after given time.""" + custom_types.CLI_DATETIME.VALID_DATETIME_CLI_HELP_MESSAGE)
+@cli_util.option('--limit', type=click.INT, help=u"""The maximum number of items to return in a page.""")
+@cli_util.option('--page', help=u"""The page token representing the page at which you want to start retrieving results. This token is usually retrieved from a previous list call.""")
+@cli_util.option('--sort-by', type=custom_types.CliCaseInsensitiveChoice(["timeCreated", "displayName", "buildIdentifier"]), help=u"""The field by which you want to sort. You can provide only one type of sort order. The default order for `timeCreated` is descending. The default order for `displayName` is ascending. If no value is specified, then `timeCreated` is the default. When listing software images within the same `version`, using `sortBy=buildIdentifier` is recommended. `buildIdentifier` is a monotonically increasing, time-ordered string marker (yyyy-mm-dd-hh:mm:ss) stored with the image.""")
+@cli_util.option('--sort-order', type=custom_types.CliCaseInsensitiveChoice(["ASC", "DESC"]), help=u"""The sort order that you want to use, which is either `ASC` or `DESC`.""")
+@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': 'datacc', 'class': 'MaintenanceRunCollection'})
+@cli_util.wrap_exceptions
+def list_maintenance_runs(ctx, from_json, all_pages, page_size, compartment_id, display_name, infrastructure_id, target_resource_type, maintenance_type, lifecycle_state, maintenance_subtype, time_accepted_less_than_or_equal_to, time_accepted_greater_than_or_equal_to, limit, page, sort_by, sort_order):
+
+ if all_pages and limit:
+ raise click.UsageError('If you provide the --all option you cannot provide the --limit option')
+
+ kwargs = {}
+ if display_name is not None:
+ kwargs['display_name'] = display_name
+ if infrastructure_id is not None:
+ kwargs['infrastructure_id'] = infrastructure_id
+ if target_resource_type is not None:
+ kwargs['target_resource_type'] = target_resource_type
+ if maintenance_type is not None:
+ kwargs['maintenance_type'] = maintenance_type
+ if lifecycle_state is not None:
+ kwargs['lifecycle_state'] = lifecycle_state
+ if maintenance_subtype is not None:
+ kwargs['maintenance_subtype'] = maintenance_subtype
+ if time_accepted_less_than_or_equal_to is not None:
+ kwargs['time_accepted_less_than_or_equal_to'] = time_accepted_less_than_or_equal_to
+ if time_accepted_greater_than_or_equal_to is not None:
+ kwargs['time_accepted_greater_than_or_equal_to'] = time_accepted_greater_than_or_equal_to
+ if limit is not None:
+ kwargs['limit'] = limit
+ if page is not None:
+ kwargs['page'] = page
+ if sort_by is not None:
+ kwargs['sort_by'] = sort_by
+ if sort_order is not None:
+ kwargs['sort_order'] = sort_order
+ kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
+ client = cli_util.build_client('datacc', 'baseinfra', ctx)
+ if all_pages:
+ if page_size:
+ kwargs['limit'] = page_size
+
+ result = cli_util.list_call_get_all_results(
+ client.list_maintenance_runs,
+ compartment_id=compartment_id,
+ **kwargs
+ )
+ elif limit is not None:
+ result = cli_util.list_call_get_up_to_limit(
+ client.list_maintenance_runs,
+ limit,
+ page_size,
+ compartment_id=compartment_id,
+ **kwargs
+ )
+ else:
+ result = client.list_maintenance_runs(
+ compartment_id=compartment_id,
+ **kwargs
+ )
+ cli_util.render_response(result, ctx)
+
+
+@vm_cluster_network_summary_group.command(name=cli_util.override('datacc.list_vm_cluster_networks.command_name', 'list'), help=u"""Obtain a list of VM cluster networks on Database Infrastructure. \n[Command Reference](listVmClusterNetworks)""")
+@cli_util.option('--compartment-id', required=True, help=u"""The [OCID] of the compartment. For list operations, you may provide the tenant [OCID] in this field. When a tenant OCID is provided, it will be validated against the caller's tenant and then treated as tenant scope (compartmentId filtering is not applied).""")
+@cli_util.option('--display-name', help=u"""A filter to return resources that match the entire display name given. The match is case sensitive.""")
+@cli_util.option('--lifecycle-state', type=custom_types.CliCaseInsensitiveChoice(["CREATING", "REQUIRES_VALIDATION", "VALIDATING", "VALIDATED", "VALIDATION_FAILED", "UPDATING", "ALLOCATED", "DELETING", "DELETED"]), multiple=True, help=u"""A filter to return resources that match the specified lifecycle state.""")
+@cli_util.option('--is-scan-enabled', type=click.BOOL, help=u"""A filter to return VM cluster network resources that matches the specified value.""")
+@cli_util.option('--limit', type=click.INT, help=u"""The maximum number of items to return in a page.""")
+@cli_util.option('--page', help=u"""The page token representing the page at which you want to start retrieving results. This token is usually retrieved from a previous list call.""")
+@cli_util.option('--sort-order', type=custom_types.CliCaseInsensitiveChoice(["ASC", "DESC"]), help=u"""The sort order that you want to use, which is either `ASC` or `DESC`.""")
+@cli_util.option('--sort-by', type=custom_types.CliCaseInsensitiveChoice(["timeCreated", "displayName", "buildIdentifier"]), help=u"""The field by which you want to sort. You can provide only one type of sort order. The default order for `timeCreated` is descending. The default order for `displayName` is ascending. If no value is specified, then `timeCreated` is the default. When listing software images within the same `version`, using `sortBy=buildIdentifier` is recommended. `buildIdentifier` is a monotonically increasing, time-ordered string marker (yyyy-mm-dd-hh:mm:ss) stored with the image.""")
+@cli_util.option('--infrastructure-id', help=u"""The [OCID] of the Database Infrastructure.""")
+@cli_util.option('--node-count', type=click.INT, help=u"""Count of virtual machines in this VM cluster.""")
+@cli_util.option('--vm-network-consumer-type', type=custom_types.CliCaseInsensitiveChoice(["INSTANCE", "CLUSTER"]), help=u"""VM network consumer type.""")
+@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': 'datacc', 'class': 'VmClusterNetworkCollection'})
+@cli_util.wrap_exceptions
+def list_vm_cluster_networks(ctx, from_json, all_pages, page_size, compartment_id, display_name, lifecycle_state, is_scan_enabled, limit, page, sort_order, sort_by, infrastructure_id, node_count, vm_network_consumer_type):
+
+ if all_pages and limit:
+ raise click.UsageError('If you provide the --all option you cannot provide the --limit option')
+
+ kwargs = {}
+ if display_name is not None:
+ kwargs['display_name'] = display_name
+ if lifecycle_state is not None and len(lifecycle_state) > 0:
+ kwargs['lifecycle_state'] = lifecycle_state
+ if is_scan_enabled is not None:
+ kwargs['is_scan_enabled'] = is_scan_enabled
+ 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
+ if infrastructure_id is not None:
+ kwargs['infrastructure_id'] = infrastructure_id
+ if node_count is not None:
+ kwargs['node_count'] = node_count
+ if vm_network_consumer_type is not None:
+ kwargs['vm_network_consumer_type'] = vm_network_consumer_type
+ kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
+ client = cli_util.build_client('datacc', 'baseinfra', ctx)
+ if all_pages:
+ if page_size:
+ kwargs['limit'] = page_size
+
+ result = cli_util.list_call_get_all_results(
+ client.list_vm_cluster_networks,
+ compartment_id=compartment_id,
+ **kwargs
+ )
+ elif limit is not None:
+ result = cli_util.list_call_get_up_to_limit(
+ client.list_vm_cluster_networks,
+ limit,
+ page_size,
+ compartment_id=compartment_id,
+ **kwargs
+ )
+ else:
+ result = client.list_vm_cluster_networks(
+ compartment_id=compartment_id,
+ **kwargs
+ )
+ cli_util.render_response(result, ctx)
+
+
+@vm_instance_summary_group.command(name=cli_util.override('datacc.list_vm_instances.command_name', 'list'), help=u"""Obtain a list of VM instances. \n[Command Reference](listVmInstances)""")
+@cli_util.option('--compartment-id', required=True, help=u"""The [OCID] of the compartment. For list operations, you may provide the tenant [OCID] in this field. When a tenant OCID is provided, it will be validated against the caller's tenant and then treated as tenant scope (compartmentId filtering is not applied).""")
+@cli_util.option('--display-name', help=u"""A filter to return resources that match the entire display name given. The match is case sensitive.""")
+@cli_util.option('--lifecycle-state', type=custom_types.CliCaseInsensitiveChoice(["CREATING", "ACTIVE", "INACTIVE", "UPDATING", "DELETING", "DELETED"]), multiple=True, help=u"""A filter to return resources that match the specified lifecycle state.""")
+@cli_util.option('--limit', type=click.INT, help=u"""The maximum number of items to return in a page.""")
+@cli_util.option('--page', help=u"""The page token representing the page at which you want to start retrieving results. This token is usually retrieved from a previous list call.""")
+@cli_util.option('--sort-order', type=custom_types.CliCaseInsensitiveChoice(["ASC", "DESC"]), help=u"""The sort order that you want to use, which is either `ASC` or `DESC`.""")
+@cli_util.option('--sort-by', type=custom_types.CliCaseInsensitiveChoice(["timeCreated", "displayName", "buildIdentifier"]), help=u"""The field by which you want to sort. You can provide only one type of sort order. The default order for `timeCreated` is descending. The default order for `displayName` is ascending. If no value is specified, then `timeCreated` is the default. When listing software images within the same `version`, using `sortBy=buildIdentifier` is recommended. `buildIdentifier` is a monotonically increasing, time-ordered string marker (yyyy-mm-dd-hh:mm:ss) stored with the image.""")
+@cli_util.option('--infrastructure-id', help=u"""The [OCID] of the Database Infrastructure.""")
+@cli_util.option('--base-server-id', help=u"""The [OCID] of the Database Infrastructure Server Id.""")
+@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': 'datacc', 'class': 'VmInstanceCollection'})
+@cli_util.wrap_exceptions
+def list_vm_instances(ctx, from_json, all_pages, page_size, compartment_id, display_name, lifecycle_state, limit, page, sort_order, sort_by, infrastructure_id, base_server_id):
+
+ if all_pages and limit:
+ raise click.UsageError('If you provide the --all option you cannot provide the --limit option')
+
+ kwargs = {}
+ if display_name is not None:
+ kwargs['display_name'] = display_name
+ if lifecycle_state is not None and len(lifecycle_state) > 0:
+ kwargs['lifecycle_state'] = lifecycle_state
+ 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
+ if infrastructure_id is not None:
+ kwargs['infrastructure_id'] = infrastructure_id
+ if base_server_id is not None:
+ kwargs['base_server_id'] = base_server_id
+ kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
+ client = cli_util.build_client('datacc', 'baseinfra', ctx)
+ if all_pages:
+ if page_size:
+ kwargs['limit'] = page_size
+
+ result = cli_util.list_call_get_all_results(
+ client.list_vm_instances,
+ compartment_id=compartment_id,
+ **kwargs
+ )
+ elif limit is not None:
+ result = cli_util.list_call_get_up_to_limit(
+ client.list_vm_instances,
+ limit,
+ page_size,
+ compartment_id=compartment_id,
+ **kwargs
+ )
+ else:
+ result = client.list_vm_instances(
+ compartment_id=compartment_id,
+ **kwargs
+ )
+ cli_util.render_response(result, ctx)
+
+
+@work_request_error_group.command(name=cli_util.override('datacc.list_work_request_errors.command_name', 'list'), help=u"""View the list of errors for the work request that have the specified work request [OCID]. \n[Command Reference](listWorkRequestErrors)""")
+@cli_util.option('--work-request-id', required=True, help=u"""The [OCID] of the asynchronous work request.""")
+@cli_util.option('--page', help=u"""The page token representing the page at which you want to start retrieving results. This token is usually retrieved from a previous list call.""")
+@cli_util.option('--limit', type=click.INT, help=u"""The maximum number of items to return in a page.""")
+@cli_util.option('--sort-order', type=custom_types.CliCaseInsensitiveChoice(["ASC", "DESC"]), help=u"""The sort order that you want to use, which is either `ASC` or `DESC`.""")
+@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': 'datacc', 'class': 'WorkRequestErrorCollection'})
+@cli_util.wrap_exceptions
+def list_work_request_errors(ctx, from_json, all_pages, page_size, work_request_id, page, limit, sort_order):
+
+ if all_pages and limit:
+ raise click.UsageError('If you provide the --all option you cannot provide the --limit option')
+
+ if isinstance(work_request_id, six.string_types) and len(work_request_id.strip()) == 0:
+ raise click.UsageError('Parameter --work-request-id cannot be whitespace or empty string')
+
+ kwargs = {}
+ if page is not None:
+ kwargs['page'] = page
+ if limit is not None:
+ kwargs['limit'] = limit
+ if sort_order is not None:
+ kwargs['sort_order'] = sort_order
+ kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
+ client = cli_util.build_client('datacc', 'baseinfra', ctx)
+ if all_pages:
+ if page_size:
+ kwargs['limit'] = page_size
+
+ result = cli_util.list_call_get_all_results(
+ client.list_work_request_errors,
+ work_request_id=work_request_id,
+ **kwargs
+ )
+ elif limit is not None:
+ result = cli_util.list_call_get_up_to_limit(
+ client.list_work_request_errors,
+ limit,
+ page_size,
+ work_request_id=work_request_id,
+ **kwargs
+ )
+ else:
+ result = client.list_work_request_errors(
+ work_request_id=work_request_id,
+ **kwargs
+ )
+ cli_util.render_response(result, ctx)
+
+
+@work_request_log_entry_group.command(name=cli_util.override('datacc.list_work_request_logs.command_name', 'list'), help=u"""View the log entries for the work request that have the specified work request [OCID]. \n[Command Reference](listWorkRequestLogs)""")
+@cli_util.option('--work-request-id', required=True, help=u"""The [OCID] of the asynchronous work request.""")
+@cli_util.option('--page', help=u"""The page token representing the page at which you want to start retrieving results. This token is usually retrieved from a previous list call.""")
+@cli_util.option('--limit', type=click.INT, help=u"""The maximum number of items to return in a page.""")
+@cli_util.option('--sort-order', type=custom_types.CliCaseInsensitiveChoice(["ASC", "DESC"]), help=u"""The sort order that you want to use, which is either `ASC` or `DESC`.""")
+@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': 'datacc', 'class': 'WorkRequestLogEntryCollection'})
+@cli_util.wrap_exceptions
+def list_work_request_logs(ctx, from_json, all_pages, page_size, work_request_id, page, limit, sort_order):
+
+ if all_pages and limit:
+ raise click.UsageError('If you provide the --all option you cannot provide the --limit option')
+
+ if isinstance(work_request_id, six.string_types) and len(work_request_id.strip()) == 0:
+ raise click.UsageError('Parameter --work-request-id cannot be whitespace or empty string')
+
+ kwargs = {}
+ if page is not None:
+ kwargs['page'] = page
+ if limit is not None:
+ kwargs['limit'] = limit
+ if sort_order is not None:
+ kwargs['sort_order'] = sort_order
+ kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
+ client = cli_util.build_client('datacc', 'baseinfra', ctx)
+ if all_pages:
+ if page_size:
+ kwargs['limit'] = page_size
+
+ result = cli_util.list_call_get_all_results(
+ client.list_work_request_logs,
+ work_request_id=work_request_id,
+ **kwargs
+ )
+ elif limit is not None:
+ result = cli_util.list_call_get_up_to_limit(
+ client.list_work_request_logs,
+ limit,
+ page_size,
+ work_request_id=work_request_id,
+ **kwargs
+ )
+ else:
+ result = client.list_work_request_logs(
+ work_request_id=work_request_id,
+ **kwargs
+ )
+ cli_util.render_response(result, ctx)
+
+
+@work_request_group.command(name=cli_util.override('datacc.list_work_requests.command_name', 'list'), help=u"""View a list of work request details in the specified compartment. \n[Command Reference](listWorkRequests)""")
+@cli_util.option('--compartment-id', required=True, help=u"""The [OCID] of the compartment. For list operations, you may provide the tenant [OCID] in this field. When a tenant OCID is provided, it will be validated against the caller's tenant and then treated as tenant scope (compartmentId filtering is not applied).""")
+@cli_util.option('--resource-id', help=u"""The [OCID] of the work request resource.""")
+@cli_util.option('--page', help=u"""The page token representing the page at which you want to start retrieving results. This token is usually retrieved from a previous list call.""")
+@cli_util.option('--limit', type=click.INT, help=u"""The maximum number of items to return in a page.""")
+@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': 'datacc', 'class': 'WorkRequestCollection'})
+@cli_util.wrap_exceptions
+def list_work_requests(ctx, from_json, all_pages, page_size, compartment_id, resource_id, page, limit):
+
+ if all_pages and limit:
+ raise click.UsageError('If you provide the --all option you cannot provide the --limit option')
+
+ kwargs = {}
+ if resource_id is not None:
+ kwargs['resource_id'] = resource_id
+ if page is not None:
+ kwargs['page'] = page
+ if limit is not None:
+ kwargs['limit'] = limit
+ kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
+ client = cli_util.build_client('datacc', 'baseinfra', ctx)
+ if all_pages:
+ if page_size:
+ kwargs['limit'] = page_size
+
+ result = cli_util.list_call_get_all_results(
+ client.list_work_requests,
+ compartment_id=compartment_id,
+ **kwargs
+ )
+ elif limit is not None:
+ result = cli_util.list_call_get_up_to_limit(
+ client.list_work_requests,
+ limit,
+ page_size,
+ compartment_id=compartment_id,
+ **kwargs
+ )
+ else:
+ result = client.list_work_requests(
+ compartment_id=compartment_id,
+ **kwargs
+ )
+ cli_util.render_response(result, ctx)
+
+
+@vm_instance_group.command(name=cli_util.override('datacc.migrate_vm_instance.command_name', 'migrate'), help=u"""Migrate the VM instance on Database Infrastructure that has the specified [OCID]. \n[Command Reference](migrateVmInstance)""")
+@cli_util.option('--vm-instance-id', required=True, help=u"""The [OCID] of the VM instance.""")
+@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 is updated or deleted only if the Etag that you provide matches the current Etag value for the resource.""")
+@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED", "WAITING"]), 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 ACCEPTED --wait-for-state WAITING 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 migrate_vm_instance(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, vm_instance_id, if_match):
+
+ if isinstance(vm_instance_id, six.string_types) and len(vm_instance_id.strip()) == 0:
+ raise click.UsageError('Parameter --vm-instance-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('datacc', 'baseinfra', ctx)
+ result = client.migrate_vm_instance(
+ vm_instance_id=vm_instance_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. 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)
+
+
+@maintenance_run_group.command(name=cli_util.override('datacc.reschedule_maintenance_run.command_name', 'reschedule'), help=u"""Reschedules the specified maintenance run by providing a new `timeScheduled` value. Only maintenance runs in eligible states may be rescheduled. \n[Command Reference](rescheduleMaintenanceRun)""")
+@cli_util.option('--maintenance-run-id', required=True, help=u"""The maintenance run OCID.""")
+@cli_util.option('--time-scheduled', required=True, type=custom_types.CLI_DATETIME, help=u"""The new date and time for the scheduled maintenance run.""" + custom_types.CLI_DATETIME.VALID_DATETIME_CLI_HELP_MESSAGE)
+@cli_util.option('--reason', help=u"""The reason for rescheduling the maintenance run.""")
+@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 is updated or deleted only if the Etag that you provide matches the current Etag value for the resource.""")
+@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED", "WAITING"]), 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 ACCEPTED --wait-for-state WAITING 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={}, output_type={'module': 'datacc', 'class': 'MaintenanceRun'})
+@cli_util.wrap_exceptions
+def reschedule_maintenance_run(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, maintenance_run_id, time_scheduled, reason, if_match):
+
+ if isinstance(maintenance_run_id, six.string_types) and len(maintenance_run_id.strip()) == 0:
+ raise click.UsageError('Parameter --maintenance-run-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['timeScheduled'] = time_scheduled
+
+ if reason is not None:
+ _details['reason'] = reason
+
+ client = cli_util.build_client('datacc', 'baseinfra', ctx)
+ result = client.reschedule_maintenance_run(
+ maintenance_run_id=maintenance_run_id,
+ reschedule_maintenance_run_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)
+
+
+@vm_instance_group.command(name=cli_util.override('datacc.restart_vm_instance.command_name', 'restart'), help=u"""Restart the VM instance on Database Infrastructure that has the specified [OCID]. \n[Command Reference](restartVmInstance)""")
+@cli_util.option('--vm-instance-id', required=True, help=u"""The [OCID] of the VM instance.""")
+@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 is updated or deleted only if the Etag that you provide matches the current Etag value for the resource.""")
+@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED", "WAITING"]), 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 ACCEPTED --wait-for-state WAITING 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 restart_vm_instance(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, vm_instance_id, if_match):
+
+ if isinstance(vm_instance_id, six.string_types) and len(vm_instance_id.strip()) == 0:
+ raise click.UsageError('Parameter --vm-instance-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('datacc', 'baseinfra', ctx)
+ result = client.restart_vm_instance(
+ vm_instance_id=vm_instance_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. 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)
+
+
+@infrastructure_group.command(name=cli_util.override('datacc.scale_infrastructure_storage.command_name', 'scale-infrastructure-storage'), help=u"""Scale storage for the specified infrastructure using the specified details. \n[Command Reference](scaleInfrastructureStorage)""")
+@cli_util.option('--infrastructure-id', required=True, help=u"""The [OCID] of the Database Infrastructure.""")
+@cli_util.option('--ssd-configuration-requested', type=custom_types.CliCaseInsensitiveChoice(["SIX_SSDS", "TWELVE_SSDS", "EIGHTEEN_SSDS", "TWENTY_FOUR_SSDS"]), help=u"""The scale option to be selected for the infrastructure.""")
+@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 is updated or deleted only if the Etag that you provide matches the current Etag value for the resource.""")
+@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED", "WAITING"]), 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 ACCEPTED --wait-for-state WAITING 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 scale_infrastructure_storage(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, infrastructure_id, ssd_configuration_requested, if_match):
+
+ if isinstance(infrastructure_id, six.string_types) and len(infrastructure_id.strip()) == 0:
+ raise click.UsageError('Parameter --infrastructure-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 ssd_configuration_requested is not None:
+ _details['ssdConfigurationRequested'] = ssd_configuration_requested
+
+ client = cli_util.build_client('datacc', 'baseinfra', ctx)
+ result = client.scale_infrastructure_storage(
+ infrastructure_id=infrastructure_id,
+ scale_infrastructure_storage_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)
+
+
+@vm_instance_group.command(name=cli_util.override('datacc.scale_vm_instance.command_name', 'scale'), help=u"""Scale the VM instance on Database Infrastructure that has the specified [OCID]. \n[Command Reference](scaleVmInstance)""")
+@cli_util.option('--vm-instance-id', required=True, help=u"""The [OCID] of the VM instance.""")
+@cli_util.option('--memory-size-in-gbs', help=u"""The memory to be allocated in GBs.""")
+@cli_util.option('--cpus-enabled', type=click.INT, help=u"""The number of CPU cores to be enabled for VM instance.""")
+@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 is updated or deleted only if the Etag that you provide matches the current Etag value for the resource.""")
+@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED", "WAITING"]), 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 ACCEPTED --wait-for-state WAITING 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 scale_vm_instance(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, vm_instance_id, memory_size_in_gbs, cpus_enabled, if_match):
+
+ if isinstance(vm_instance_id, six.string_types) and len(vm_instance_id.strip()) == 0:
+ raise click.UsageError('Parameter --vm-instance-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 memory_size_in_gbs is not None:
+ _details['memorySizeInGBs'] = memory_size_in_gbs
+
+ if cpus_enabled is not None:
+ _details['cpusEnabled'] = cpus_enabled
+
+ client = cli_util.build_client('datacc', 'baseinfra', ctx)
+ result = client.scale_vm_instance(
+ vm_instance_id=vm_instance_id,
+ scale_vm_instance_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)
+
+
+@vm_instance_group.command(name=cli_util.override('datacc.start_vm_instance.command_name', 'start'), help=u"""Start the VM instance on Database Infrastructure that has the specified [OCID]. \n[Command Reference](startVmInstance)""")
+@cli_util.option('--vm-instance-id', required=True, help=u"""The [OCID] of the VM instance.""")
+@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 is updated or deleted only if the Etag that you provide matches the current Etag value for the resource.""")
+@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED", "WAITING"]), 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 ACCEPTED --wait-for-state WAITING 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 start_vm_instance(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, vm_instance_id, if_match):
+
+ if isinstance(vm_instance_id, six.string_types) and len(vm_instance_id.strip()) == 0:
+ raise click.UsageError('Parameter --vm-instance-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('datacc', 'baseinfra', ctx)
+ result = client.start_vm_instance(
+ vm_instance_id=vm_instance_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. 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)
+
+
+@vm_instance_group.command(name=cli_util.override('datacc.stop_vm_instance.command_name', 'stop'), help=u"""Stop the VM instance on Database Infrastructure that has the specified [OCID]. \n[Command Reference](stopVmInstance)""")
+@cli_util.option('--vm-instance-id', required=True, help=u"""The [OCID] of the VM instance.""")
+@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 is updated or deleted only if the Etag that you provide matches the current Etag value for the resource.""")
+@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED", "WAITING"]), 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 ACCEPTED --wait-for-state WAITING 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 stop_vm_instance(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, vm_instance_id, if_match):
+
+ if isinstance(vm_instance_id, six.string_types) and len(vm_instance_id.strip()) == 0:
+ raise click.UsageError('Parameter --vm-instance-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('datacc', 'baseinfra', ctx)
+ result = client.stop_vm_instance(
+ vm_instance_id=vm_instance_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. 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)
+
+
+@infrastructure_group.command(name=cli_util.override('datacc.update_infrastructure.command_name', 'update'), help=u"""Update the Database Infrastructure that has the specified [OCID]. \n[Command Reference](updateInfrastructure)""")
+@cli_util.option('--infrastructure-id', required=True, help=u"""The [OCID] of the Database Infrastructure.""")
+@cli_util.option('--display-name', help=u"""The user-friendly name for the Database Infrastructure. The name does not need to be unique.""")
+@cli_util.option('--description', help=u"""Database Infrastructure description.""")
+@cli_util.option('--system-model', type=custom_types.CliCaseInsensitiveChoice(["X11_HA_768", "X10_HA_512", "X8_HA_384"]), help=u"""Database Infrastructure System Model specification. The system model determines the model of the Database Infrastructure hardware to be used.""")
+@cli_util.option('--shape', type=custom_types.CliCaseInsensitiveChoice(["SIX_SSDS", "TWELVE_SSDS", "EIGHTEEN_SSDS", "TWENTY_FOUR_SSDS"]), help=u"""The shape of the Database Infrastructure. The shape determines the amount of CPU, storage, and memory resources allocated to the instance.""")
+@cli_util.option('--cloud-control-plane-server1', help=u"""The IP address for the first control plane server.""")
+@cli_util.option('--cloud-control-plane-server2', help=u"""The IP address for the second control plane server.""")
+@cli_util.option('--netmask', help=u"""The netmask for the control plane network.""")
+@cli_util.option('--gateway', help=u"""The gateway for the control plane network.""")
+@cli_util.option('--admin-networkcidr', help=u"""The CIDR block for the system network. The system network is a private network in Database Infrastructure and is not connected to your corporate network. The system network is used for storage (ASM) traffic, high-performance interconnect traffic and administration of infrastructure components.""")
+@cli_util.option('--data-disk-percentage', type=click.INT, help=u"""Percentage of disk space assigned for DATA disk group. Remaining disk space will get assiged to RECO disk group""")
+@cli_util.option('--contacts', type=custom_types.CLI_COMPLEX_TYPE, help=u"""The list of contacts for the Database Infrastructure.
+
+This option is a JSON list with items of type InfrastructureContact. For documentation on InfrastructureContact please see our API reference: https://docs.oracle.com/en-us/iaas/api/#/en/baseinfra/20251101/datatypes/InfrastructureContact.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
+@cli_util.option('--dns-servers', type=custom_types.CLI_COMPLEX_TYPE, help=u"""The list of DNS server IP addresses. Maximum of 3 allowed.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
+@cli_util.option('--ntp-servers', type=custom_types.CLI_COMPLEX_TYPE, help=u"""The list of NTP server IP addresses. Maximum of 3 allowed.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
+@cli_util.option('--client-bond-mode', type=custom_types.CliCaseInsensitiveChoice(["ACTIVE_BACKUP", "LACP"]), help=u"""The network bonding mode for Client networks for the Database Infrastructure.""")
+@cli_util.option('--backup-bond-mode', type=custom_types.CliCaseInsensitiveChoice(["ACTIVE_BACKUP", "LACP"]), help=u"""The network bonding mode for Backup networks for the Database Infrastructure.""")
+@cli_util.option('--cps-bond-mode', type=custom_types.CliCaseInsensitiveChoice(["ACTIVE_BACKUP", "LACP"]), help=u"""The network bonding mode for CPS networks for the Database Infrastructure.""")
+@cli_util.option('--client-bond-iface', type=custom_types.CliCaseInsensitiveChoice(["BTBOND1", "BTBOND2", "BTBOND3", "BTBOND4", "BTBOND5", "BTBOND6"]), help=u"""The network bonding interface for client network for the Database Infrastructure.""")
+@cli_util.option('--backup-bond-iface', type=custom_types.CliCaseInsensitiveChoice(["BTBOND1", "BTBOND2", "BTBOND3", "BTBOND4", "BTBOND5", "BTBOND6"]), help=u"""The network bonding interface for backup network for the Database Infrastructure.""")
+@cli_util.option('--cps-bond-iface', type=custom_types.CliCaseInsensitiveChoice(["BTBOND1", "BTBOND2", "BTBOND3", "BTBOND4", "BTBOND5", "BTBOND6"]), help=u"""The network bonding interface for CPS network for the Database Infrastructure.""")
+@cli_util.option('--acfs-size-in-gbs', help=u"""The amount of storage (in GB) in the DATA disk group that is reserved for creating local storage for VM Clusters and application VMs.""")
+@cli_util.option('--corporate-proxy', help=u"""The corporate network proxy for access to the control plane network. Oracle recommends using an HTTPS proxy when possible for enhanced security.""")
+@cli_util.option('--vlan-id', help=u"""The CPS network VLAN ID.""")
+@cli_util.option('--maintenance-window', type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
+@cli_util.option('--defined-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
+@cli_util.option('--freeform-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Simple key-value pair that is applied without any predefined name, type or scope. This tag option exists for cross-compatibility only. Example: `{\"bar-key\": \"value\"}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
+@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 is updated or deleted only if the Etag that you provide matches the current Etag value for the resource.""")
+@cli_util.option('--force', help="""Perform update without prompting for confirmation.""", is_flag=True)
+@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED", "WAITING"]), 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 ACCEPTED --wait-for-state WAITING 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({'contacts': {'module': 'datacc', 'class': 'list[InfrastructureContact]'}, 'dns-servers': {'module': 'datacc', 'class': 'list[string]'}, 'ntp-servers': {'module': 'datacc', 'class': 'list[string]'}, 'maintenance-window': {'module': 'datacc', 'class': 'MaintenanceWindow'}, 'defined-tags': {'module': 'datacc', 'class': 'dict(str, dict(str, object))'}, 'freeform-tags': {'module': 'datacc', 'class': 'dict(str, string)'}})
+@cli_util.help_option
+@click.pass_context
+@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'contacts': {'module': 'datacc', 'class': 'list[InfrastructureContact]'}, 'dns-servers': {'module': 'datacc', 'class': 'list[string]'}, 'ntp-servers': {'module': 'datacc', 'class': 'list[string]'}, 'maintenance-window': {'module': 'datacc', 'class': 'MaintenanceWindow'}, 'defined-tags': {'module': 'datacc', 'class': 'dict(str, dict(str, object))'}, 'freeform-tags': {'module': 'datacc', 'class': 'dict(str, string)'}}, output_type={'module': 'datacc', 'class': 'Infrastructure'})
+@cli_util.wrap_exceptions
+def update_infrastructure(ctx, from_json, force, wait_for_state, max_wait_seconds, wait_interval_seconds, infrastructure_id, display_name, description, system_model, shape, cloud_control_plane_server1, cloud_control_plane_server2, netmask, gateway, admin_networkcidr, data_disk_percentage, contacts, dns_servers, ntp_servers, client_bond_mode, backup_bond_mode, cps_bond_mode, client_bond_iface, backup_bond_iface, cps_bond_iface, acfs_size_in_gbs, corporate_proxy, vlan_id, maintenance_window, defined_tags, freeform_tags, if_match):
+
+ if isinstance(infrastructure_id, six.string_types) and len(infrastructure_id.strip()) == 0:
+ raise click.UsageError('Parameter --infrastructure-id cannot be whitespace or empty string')
+ if not force:
+ if contacts or dns_servers or ntp_servers or maintenance_window or defined_tags or freeform_tags:
+ if not click.confirm("WARNING: Updates to contacts and dns-servers and ntp-servers and maintenance-window and defined-tags and freeform-tags will replace any existing values. Are you sure you want to continue?"):
+ ctx.abort()
+
+ 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
+
+ if system_model is not None:
+ _details['systemModel'] = system_model
+
+ if shape is not None:
+ _details['shape'] = shape
+
+ if cloud_control_plane_server1 is not None:
+ _details['cloudControlPlaneServer1'] = cloud_control_plane_server1
+
+ if cloud_control_plane_server2 is not None:
+ _details['cloudControlPlaneServer2'] = cloud_control_plane_server2
+
+ if netmask is not None:
+ _details['netmask'] = netmask
+
+ if gateway is not None:
+ _details['gateway'] = gateway
+
+ if admin_networkcidr is not None:
+ _details['adminNetworkcidr'] = admin_networkcidr
+
+ if data_disk_percentage is not None:
+ _details['dataDiskPercentage'] = data_disk_percentage
+
+ if contacts is not None:
+ _details['contacts'] = cli_util.parse_json_parameter("contacts", contacts)
+
+ if dns_servers is not None:
+ _details['dnsServers'] = cli_util.parse_json_parameter("dns_servers", dns_servers)
+
+ if ntp_servers is not None:
+ _details['ntpServers'] = cli_util.parse_json_parameter("ntp_servers", ntp_servers)
+
+ if client_bond_mode is not None:
+ _details['clientNetworkBondingMode'] = client_bond_mode
+
+ if backup_bond_mode is not None:
+ _details['backupNetworkBondingMode'] = backup_bond_mode
+
+ if cps_bond_mode is not None:
+ _details['cpsNetworkBondingMode'] = cps_bond_mode
+
+ if client_bond_iface is not None:
+ _details['clientNetworkBondingInterface'] = client_bond_iface
+
+ if backup_bond_iface is not None:
+ _details['backupNetworkBondingInterface'] = backup_bond_iface
+
+ if cps_bond_iface is not None:
+ _details['cpsNetworkBondingInterface'] = cps_bond_iface
+
+ if acfs_size_in_gbs is not None:
+ _details['acfsFileSystemStorageInGbs'] = acfs_size_in_gbs
+
+ if corporate_proxy is not None:
+ _details['corporateProxy'] = corporate_proxy
+
+ if vlan_id is not None:
+ _details['vlanId'] = vlan_id
+
+ if maintenance_window is not None:
+ _details['maintenanceWindow'] = cli_util.parse_json_parameter("maintenance_window", maintenance_window)
+
+ if defined_tags is not None:
+ _details['definedTags'] = cli_util.parse_json_parameter("defined_tags", defined_tags)
+
+ if freeform_tags is not None:
+ _details['freeformTags'] = cli_util.parse_json_parameter("freeform_tags", freeform_tags)
+
+ client = cli_util.build_client('datacc', 'baseinfra', ctx)
+ result = client.update_infrastructure(
+ infrastructure_id=infrastructure_id,
+ update_infrastructure_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)
+
+
+@maintenance_run_group.command(name=cli_util.override('datacc.update_maintenance_run.command_name', 'update'), help=u"""Update maintenance run attributes. \n[Command Reference](updateMaintenanceRun)""")
+@cli_util.option('--patching-mode', required=True, type=custom_types.CliCaseInsensitiveChoice(["ROLLING", "NONROLLING"]), help=u"""Database Infrastructure patching mode, either \"ROLLING\" or \"NONROLLING\". Default value is ROLLING.""")
+@cli_util.option('--custom-action-timeout-in-mins', required=True, type=click.INT, help=u"""Determines the amount of time the system will wait before the start of each compute server patching operation. Supported values are 15 to 120 minutes.""")
+@cli_util.option('--maintenance-run-id', required=True, help=u"""The maintenance run OCID.""")
+@cli_util.option('--is-custom-action-timeout-enabled', type=click.BOOL, help=u"""If true, enables configuration of customActionTimeoutInMins for this maintenance run update request.""")
+@cli_util.option('--defined-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
+@cli_util.option('--freeform-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Simple key-value pair that is applied without any predefined name, type or scope. This tag option exists for cross-compatibility only. Example: `{\"bar-key\": \"value\"}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
+@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 is updated or deleted only if the Etag that you provide matches the current Etag value for the resource.""")
+@cli_util.option('--force', help="""Perform update without prompting for confirmation.""", is_flag=True)
+@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED", "WAITING"]), 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 ACCEPTED --wait-for-state WAITING 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({'defined-tags': {'module': 'datacc', 'class': 'dict(str, dict(str, object))'}, 'freeform-tags': {'module': 'datacc', 'class': 'dict(str, string)'}})
+@cli_util.help_option
+@click.pass_context
+@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'defined-tags': {'module': 'datacc', 'class': 'dict(str, dict(str, object))'}, 'freeform-tags': {'module': 'datacc', 'class': 'dict(str, string)'}}, output_type={'module': 'datacc', 'class': 'MaintenanceRun'})
+@cli_util.wrap_exceptions
+def update_maintenance_run(ctx, from_json, force, wait_for_state, max_wait_seconds, wait_interval_seconds, patching_mode, custom_action_timeout_in_mins, maintenance_run_id, is_custom_action_timeout_enabled, defined_tags, freeform_tags, if_match):
+
+ if isinstance(maintenance_run_id, six.string_types) and len(maintenance_run_id.strip()) == 0:
+ raise click.UsageError('Parameter --maintenance-run-id cannot be whitespace or empty string')
+ if not force:
+ if defined_tags or freeform_tags:
+ if not click.confirm("WARNING: Updates to defined-tags and freeform-tags will replace any existing values. Are you sure you want to continue?"):
+ ctx.abort()
+
+ 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['patchingMode'] = patching_mode
+ _details['customActionTimeoutInMins'] = custom_action_timeout_in_mins
+
+ if is_custom_action_timeout_enabled is not None:
+ _details['isCustomActionTimeoutEnabled'] = is_custom_action_timeout_enabled
+
+ if defined_tags is not None:
+ _details['definedTags'] = cli_util.parse_json_parameter("defined_tags", defined_tags)
+
+ if freeform_tags is not None:
+ _details['freeformTags'] = cli_util.parse_json_parameter("freeform_tags", freeform_tags)
+
+ client = cli_util.build_client('datacc', 'baseinfra', ctx)
+ result = client.update_maintenance_run(
+ maintenance_run_id=maintenance_run_id,
+ update_maintenance_run_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)
+
+
+@vm_cluster_network_group.command(name=cli_util.override('datacc.update_vm_cluster_network.command_name', 'update'), help=u"""Update the VM cluster network on Database Infrastructure that has the specified [OCID]. \n[Command Reference](updateVmClusterNetwork)""")
+@cli_util.option('--vm-cluster-network-id', required=True, help=u"""The [OCID] of the VM cluster network.""")
+@cli_util.option('--display-name', help=u"""The user-friendly name for the VM cluster network. The name does not need to be unique.""")
+@cli_util.option('--scans', type=custom_types.CLI_COMPLEX_TYPE, help=u"""The SCAN details.
+
+This option is a JSON list with items of type ScanDetails. For documentation on ScanDetails please see our API reference: https://docs.oracle.com/en-us/iaas/api/#/en/baseinfra/20251101/datatypes/ScanDetails.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
+@cli_util.option('--listener-port', type=click.INT, help=u"""The listener TCP/IP port.""")
+@cli_util.option('--listener-port-ssl', type=click.INT, help=u"""The listener TCP/IP SSL port. Default is 2484.""")
+@cli_util.option('--dns-servers', type=custom_types.CLI_COMPLEX_TYPE, help=u"""The list of DNS server IP addresses. Maximum of 3 allowed.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
+@cli_util.option('--ntp-servers', type=custom_types.CLI_COMPLEX_TYPE, help=u"""The list of NTP server IP addresses. Maximum of 3 allowed.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
+@cli_util.option('--vm-networks', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Details of the client and backup networks.
+
+This option is a JSON list with items of type VmNetworkDetails. For documentation on VmNetworkDetails please see our API reference: https://docs.oracle.com/en-us/iaas/api/#/en/baseinfra/20251101/datatypes/VmNetworkDetails.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
+@cli_util.option('--freeform-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Simple key-value pair that is applied without any predefined name, type or scope. This tag option exists for cross-compatibility only. Example: `{\"bar-key\": \"value\"}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
+@cli_util.option('--defined-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
+@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 is updated or deleted only if the Etag that you provide matches the current Etag value for the resource.""")
+@cli_util.option('--force', help="""Perform update without prompting for confirmation.""", is_flag=True)
+@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED", "WAITING"]), 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 ACCEPTED --wait-for-state WAITING 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({'scans': {'module': 'datacc', 'class': 'list[ScanDetails]'}, 'dns-servers': {'module': 'datacc', 'class': 'list[string]'}, 'ntp-servers': {'module': 'datacc', 'class': 'list[string]'}, 'vm-networks': {'module': 'datacc', 'class': 'list[VmNetworkDetails]'}, 'freeform-tags': {'module': 'datacc', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'datacc', 'class': 'dict(str, dict(str, object))'}})
+@cli_util.help_option
+@click.pass_context
+@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'scans': {'module': 'datacc', 'class': 'list[ScanDetails]'}, 'dns-servers': {'module': 'datacc', 'class': 'list[string]'}, 'ntp-servers': {'module': 'datacc', 'class': 'list[string]'}, 'vm-networks': {'module': 'datacc', 'class': 'list[VmNetworkDetails]'}, 'freeform-tags': {'module': 'datacc', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'datacc', 'class': 'dict(str, dict(str, object))'}}, output_type={'module': 'datacc', 'class': 'VmClusterNetwork'})
+@cli_util.wrap_exceptions
+def update_vm_cluster_network(ctx, from_json, force, wait_for_state, max_wait_seconds, wait_interval_seconds, vm_cluster_network_id, display_name, scans, listener_port, listener_port_ssl, dns_servers, ntp_servers, vm_networks, freeform_tags, defined_tags, if_match):
+
+ if isinstance(vm_cluster_network_id, six.string_types) and len(vm_cluster_network_id.strip()) == 0:
+ raise click.UsageError('Parameter --vm-cluster-network-id cannot be whitespace or empty string')
+ if not force:
+ if scans or dns_servers or ntp_servers or vm_networks or freeform_tags or defined_tags:
+ if not click.confirm("WARNING: Updates to scans and dns-servers and ntp-servers and vm-networks and freeform-tags and defined-tags will replace any existing values. Are you sure you want to continue?"):
+ ctx.abort()
+
+ 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 scans is not None:
+ _details['scans'] = cli_util.parse_json_parameter("scans", scans)
+
+ if listener_port is not None:
+ _details['listenerPort'] = listener_port
+
+ if listener_port_ssl is not None:
+ _details['listenerPortSsl'] = listener_port_ssl
+
+ if dns_servers is not None:
+ _details['dnsServers'] = cli_util.parse_json_parameter("dns_servers", dns_servers)
+
+ if ntp_servers is not None:
+ _details['ntpServers'] = cli_util.parse_json_parameter("ntp_servers", ntp_servers)
+
+ if vm_networks is not None:
+ _details['vmNetworks'] = cli_util.parse_json_parameter("vm_networks", vm_networks)
+
+ if freeform_tags is not None:
+ _details['freeformTags'] = cli_util.parse_json_parameter("freeform_tags", freeform_tags)
+
+ if defined_tags is not None:
+ _details['definedTags'] = cli_util.parse_json_parameter("defined_tags", defined_tags)
+
+ client = cli_util.build_client('datacc', 'baseinfra', ctx)
+ result = client.update_vm_cluster_network(
+ vm_cluster_network_id=vm_cluster_network_id,
+ update_vm_cluster_network_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)
+
+
+@vm_instance_group.command(name=cli_util.override('datacc.update_vm_instance.command_name', 'update'), help=u"""Update the VM instance on Database Infrastructure that has the specified [OCID]. \n[Command Reference](updateVmInstance)""")
+@cli_util.option('--vm-instance-id', required=True, help=u"""The [OCID] of the VM instance.""")
+@cli_util.option('--description', help=u"""VM instance description.""")
+@cli_util.option('--display-name', help=u"""VM instance display name. This name does not have to be unique, and is changeable.""")
+@cli_util.option('--data-storage-size-in-gbs', help=u"""Data storage to be allocated in GBs.""")
+@cli_util.option('--defined-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
+@cli_util.option('--freeform-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Simple key-value pair that is applied without any predefined name, type or scope. This tag option exists for cross-compatibility only. Example: `{\"bar-key\": \"value\"}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
+@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 is updated or deleted only if the Etag that you provide matches the current Etag value for the resource.""")
+@cli_util.option('--force', help="""Perform update without prompting for confirmation.""", is_flag=True)
+@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED", "WAITING"]), 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 ACCEPTED --wait-for-state WAITING 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({'defined-tags': {'module': 'datacc', 'class': 'dict(str, dict(str, object))'}, 'freeform-tags': {'module': 'datacc', 'class': 'dict(str, string)'}})
+@cli_util.help_option
+@click.pass_context
+@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'defined-tags': {'module': 'datacc', 'class': 'dict(str, dict(str, object))'}, 'freeform-tags': {'module': 'datacc', 'class': 'dict(str, string)'}}, output_type={'module': 'datacc', 'class': 'VmInstance'})
+@cli_util.wrap_exceptions
+def update_vm_instance(ctx, from_json, force, wait_for_state, max_wait_seconds, wait_interval_seconds, vm_instance_id, description, display_name, data_storage_size_in_gbs, defined_tags, freeform_tags, if_match):
+
+ if isinstance(vm_instance_id, six.string_types) and len(vm_instance_id.strip()) == 0:
+ raise click.UsageError('Parameter --vm-instance-id cannot be whitespace or empty string')
+ if not force:
+ if defined_tags or freeform_tags:
+ if not click.confirm("WARNING: Updates to defined-tags and freeform-tags will replace any existing values. Are you sure you want to continue?"):
+ ctx.abort()
+
+ 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 description is not None:
+ _details['description'] = description
+
+ if display_name is not None:
+ _details['displayName'] = display_name
+
+ if data_storage_size_in_gbs is not None:
+ _details['dataStorageSizeInGBs'] = data_storage_size_in_gbs
+
+ if defined_tags is not None:
+ _details['definedTags'] = cli_util.parse_json_parameter("defined_tags", defined_tags)
+
+ if freeform_tags is not None:
+ _details['freeformTags'] = cli_util.parse_json_parameter("freeform_tags", freeform_tags)
+
+ client = cli_util.build_client('datacc', 'baseinfra', ctx)
+ result = client.update_vm_instance(
+ vm_instance_id=vm_instance_id,
+ update_vm_instance_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)
+
+
+@infrastructure_group.command(name=cli_util.override('datacc.validate_infrastructure.command_name', 'validate'), help=u"""Validate an Database Infrastructure using the specified details. \n[Command Reference](validateInfrastructure)""")
+@cli_util.option('--validation-zip-file', required=True, help=u"""The validation zip file.""")
+@cli_util.option('--infrastructure-id', required=True, help=u"""The [OCID] of the Database Infrastructure.""")
+@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 is updated or deleted only if the Etag that you provide matches the current Etag value for the resource.""")
+@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED", "WAITING"]), 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 ACCEPTED --wait-for-state WAITING 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={}, output_type={'module': 'datacc', 'class': 'Infrastructure'})
+@cli_util.wrap_exceptions
+def validate_infrastructure(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, validation_zip_file, infrastructure_id, if_match):
+
+ if isinstance(infrastructure_id, six.string_types) and len(infrastructure_id.strip()) == 0:
+ raise click.UsageError('Parameter --infrastructure-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['validationZipFile'] = validation_zip_file
+
+ client = cli_util.build_client('datacc', 'baseinfra', ctx)
+ result = client.validate_infrastructure(
+ infrastructure_id=infrastructure_id,
+ validate_infrastructure_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)
+
+
+@vm_cluster_network_group.command(name=cli_util.override('datacc.validate_vm_cluster_network.command_name', 'validate'), help=u"""Validates an VM cluster network on Database Infrastructure. \n[Command Reference](validateVmClusterNetwork)""")
+@cli_util.option('--vm-cluster-network-id', required=True, help=u"""The [OCID] of the VM cluster network.""")
+@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 is updated or deleted only if the Etag that you provide matches the current Etag value for the resource.""")
+@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED", "WAITING"]), 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 ACCEPTED --wait-for-state WAITING 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 validate_vm_cluster_network(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, vm_cluster_network_id, if_match):
+
+ if isinstance(vm_cluster_network_id, six.string_types) and len(vm_cluster_network_id.strip()) == 0:
+ raise click.UsageError('Parameter --vm-cluster-network-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('datacc', 'baseinfra', ctx)
+ result = client.validate_vm_cluster_network(
+ vm_cluster_network_id=vm_cluster_network_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. 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)
diff --git a/services/datacc/src/oci_cli_baseinfra/generated/client_mappings.py b/services/datacc/src/oci_cli_baseinfra/generated/client_mappings.py
new file mode 100644
index 000000000..96016edc4
--- /dev/null
+++ b/services/datacc/src/oci_cli_baseinfra/generated/client_mappings.py
@@ -0,0 +1,14 @@
+# coding: utf-8
+# Copyright (c) 2016, 2026, 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: 20251101
+
+import oci
+from oci_cli.cli_clients import CLIENT_MAP
+from oci_cli.cli_clients import MODULE_TO_TYPE_MAPPINGS
+from oci.datacc import BaseinfraClient
+
+MODULE_TO_TYPE_MAPPINGS["datacc"] = oci.datacc.models.datacc_type_mapping
+if CLIENT_MAP.get("datacc") is None:
+ CLIENT_MAP["datacc"] = {}
+CLIENT_MAP["datacc"]["baseinfra"] = BaseinfraClient
diff --git a/services/datacc/tests/__init__.py b/services/datacc/tests/__init__.py
new file mode 100644
index 000000000..2aff0b53a
--- /dev/null
+++ b/services/datacc/tests/__init__.py
@@ -0,0 +1,4 @@
+# coding: utf-8
+# Copyright (c) 2016, 2026, 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: 20251101
diff --git a/services/datacc/tests/util/generated/command_to_api.py b/services/datacc/tests/util/generated/command_to_api.py
new file mode 100644
index 000000000..2e852b8ac
--- /dev/null
+++ b/services/datacc/tests/util/generated/command_to_api.py
@@ -0,0 +1,46 @@
+# coding: utf-8
+# Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved.
+
+SDK_client_map = {
+ "datacc.activate_infrastructure": "oci.datacc.BaseinfraClient.activate_infrastructure",
+ "datacc.change_infrastructure_compartment": "oci.datacc.BaseinfraClient.change_infrastructure_compartment",
+ "datacc.change_vm_cluster_network_compartment": "oci.datacc.BaseinfraClient.change_vm_cluster_network_compartment",
+ "datacc.change_vm_instance_compartment": "oci.datacc.BaseinfraClient.change_vm_instance_compartment",
+ "datacc.create_infrastructure": "oci.datacc.BaseinfraClient.create_infrastructure",
+ "datacc.create_vm_cluster_network": "oci.datacc.BaseinfraClient.create_vm_cluster_network",
+ "datacc.create_vm_instance": "oci.datacc.BaseinfraClient.create_vm_instance",
+ "datacc.delete_infrastructure": "oci.datacc.BaseinfraClient.delete_infrastructure",
+ "datacc.delete_vm_cluster_network": "oci.datacc.BaseinfraClient.delete_vm_cluster_network",
+ "datacc.delete_vm_instance": "oci.datacc.BaseinfraClient.delete_vm_instance",
+ "datacc.download_infrastructure_config_file": "oci.datacc.BaseinfraClient.download_infrastructure_config_file",
+ "datacc.download_infrastructure_validation_script": "oci.datacc.BaseinfraClient.download_infrastructure_validation_script",
+ "datacc.generate_recommended_vm_cluster_network": "oci.datacc.BaseinfraClient.generate_recommended_vm_cluster_network",
+ "datacc.get_infrastructure": "oci.datacc.BaseinfraClient.get_infrastructure",
+ "datacc.get_infrastructure_scale_option": "oci.datacc.BaseinfraClient.get_infrastructure_scale_option",
+ "datacc.get_maintenance_execution": "oci.datacc.BaseinfraClient.get_maintenance_execution",
+ "datacc.get_maintenance_run": "oci.datacc.BaseinfraClient.get_maintenance_run",
+ "datacc.get_vm_cluster_network": "oci.datacc.BaseinfraClient.get_vm_cluster_network",
+ "datacc.get_vm_instance": "oci.datacc.BaseinfraClient.get_vm_instance",
+ "datacc.get_work_request": "oci.datacc.BaseinfraClient.get_work_request",
+ "datacc.list_infrastructures": "oci.datacc.BaseinfraClient.list_infrastructures",
+ "datacc.list_maintenance_executions": "oci.datacc.BaseinfraClient.list_maintenance_executions",
+ "datacc.list_maintenance_runs": "oci.datacc.BaseinfraClient.list_maintenance_runs",
+ "datacc.list_vm_cluster_networks": "oci.datacc.BaseinfraClient.list_vm_cluster_networks",
+ "datacc.list_vm_instances": "oci.datacc.BaseinfraClient.list_vm_instances",
+ "datacc.list_work_request_errors": "oci.datacc.BaseinfraClient.list_work_request_errors",
+ "datacc.list_work_request_logs": "oci.datacc.BaseinfraClient.list_work_request_logs",
+ "datacc.list_work_requests": "oci.datacc.BaseinfraClient.list_work_requests",
+ "datacc.migrate_vm_instance": "oci.datacc.BaseinfraClient.migrate_vm_instance",
+ "datacc.reschedule_maintenance_run": "oci.datacc.BaseinfraClient.reschedule_maintenance_run",
+ "datacc.restart_vm_instance": "oci.datacc.BaseinfraClient.restart_vm_instance",
+ "datacc.scale_infrastructure_storage": "oci.datacc.BaseinfraClient.scale_infrastructure_storage",
+ "datacc.scale_vm_instance": "oci.datacc.BaseinfraClient.scale_vm_instance",
+ "datacc.start_vm_instance": "oci.datacc.BaseinfraClient.start_vm_instance",
+ "datacc.stop_vm_instance": "oci.datacc.BaseinfraClient.stop_vm_instance",
+ "datacc.update_infrastructure": "oci.datacc.BaseinfraClient.update_infrastructure",
+ "datacc.update_maintenance_run": "oci.datacc.BaseinfraClient.update_maintenance_run",
+ "datacc.update_vm_cluster_network": "oci.datacc.BaseinfraClient.update_vm_cluster_network",
+ "datacc.update_vm_instance": "oci.datacc.BaseinfraClient.update_vm_instance",
+ "datacc.validate_infrastructure": "oci.datacc.BaseinfraClient.validate_infrastructure",
+ "datacc.validate_vm_cluster_network": "oci.datacc.BaseinfraClient.validate_vm_cluster_network",
+}
diff --git a/services/generative_ai/src/oci_cli_generative_ai/generated/generativeai_cli.py b/services/generative_ai/src/oci_cli_generative_ai/generated/generativeai_cli.py
index 11d90fe6a..6df2d0211 100644
--- a/services/generative_ai/src/oci_cli_generative_ai/generated/generativeai_cli.py
+++ b/services/generative_ai/src/oci_cli_generative_ai/generated/generativeai_cli.py
@@ -186,6 +186,14 @@ def work_request_log_entry_group():
pass
+@click.command(cli_util.override('generative_ai.hosted_application_iam_group.command_name', 'hosted-application-iam'), cls=CommandGroupWithAlias, help="""Hosted Application IAM, defines shared configurations that apply across multiple deployments of the Agent or MCP application.
+
+To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized, talk to an administrator who gives OCI resource access to users. See [Getting Started with Policies] and [Getting Access to Generative AI Resources].""")
+@cli_util.help_option_group
+def hosted_application_iam_group():
+ pass
+
+
@click.command(cli_util.override('generative_ai.generative_ai_project_group.command_name', 'generative-ai-project'), cls=CommandGroupWithAlias, help="""A GenerativeAiProject is a logical container that stores conversation, file and containers.
To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized, talk to an administrator who gives OCI resource access to users. See [Getting Started with Policies] and [Getting Access to Generative AI Resources].""")
@@ -264,6 +272,7 @@ def imported_model_collection_group():
generative_ai_root_group.add_command(imported_model_group)
generative_ai_root_group.add_command(hosted_deployment_collection_group)
generative_ai_root_group.add_command(work_request_log_entry_group)
+generative_ai_root_group.add_command(hosted_application_iam_group)
generative_ai_root_group.add_command(generative_ai_project_group)
generative_ai_root_group.add_command(model_collection_group)
generative_ai_root_group.add_command(generative_ai_private_endpoint_group)
@@ -356,6 +365,7 @@ def add_artifact(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval
Example: `{\"Operations\": {\"CostCenter\": \"42\"}}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
@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('--artifact-is-vulnerability-scan-required', type=click.BOOL, help=u"""Optional flag that requires an OCI Vulnerability Scanning Service compliance report for this artifact before it can become active. When omitted, the value defaults to false.""")
@cli_util.option('--artifact-container-uri', help=u"""image url.""")
@cli_util.option('--artifact-tag', help=u"""image tag.""")
@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "WAITING", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED"]), 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 ACCEPTED --wait-for-state CANCELED 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.""")
@@ -366,7 +376,7 @@ def add_artifact(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval
@click.pass_context
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'freeform-tags': {'module': 'generative_ai', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'generative_ai', 'class': 'dict(str, dict(str, object))'}})
@cli_util.wrap_exceptions
-def add_artifact_create_single_docker_artifact_details(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, hosted_deployment_id, freeform_tags, defined_tags, if_match, artifact_container_uri, artifact_tag):
+def add_artifact_create_single_docker_artifact_details(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, hosted_deployment_id, freeform_tags, defined_tags, if_match, artifact_is_vulnerability_scan_required, artifact_container_uri, artifact_tag):
if isinstance(hosted_deployment_id, six.string_types) and len(hosted_deployment_id.strip()) == 0:
raise click.UsageError('Parameter --hosted-deployment-id cannot be whitespace or empty string')
@@ -385,6 +395,9 @@ def add_artifact_create_single_docker_artifact_details(ctx, from_json, wait_for_
if defined_tags is not None:
_details['definedTags'] = cli_util.parse_json_parameter("defined_tags", defined_tags)
+ if artifact_is_vulnerability_scan_required is not None:
+ _details['artifact']['isVulnerabilityScanRequired'] = artifact_is_vulnerability_scan_required
+
if artifact_container_uri is not None:
_details['artifact']['containerUri'] = artifact_container_uri
@@ -701,6 +714,37 @@ def change_hosted_application_compartment(ctx, from_json, hosted_application_id,
cli_util.render_response(result, ctx)
+@hosted_application_iam_group.command(name=cli_util.override('generative_ai.change_hosted_application_iam_compartment.command_name', 'change-compartment'), help=u"""Moves a hosted application into a different compartment within the same tenancy. For information about moving resources between compartments, see [Moving Resources to a Different Compartment]. \n[Command Reference](changeHostedApplicationIamCompartment)""")
+@cli_util.option('--hosted-application-iam-id', required=True, help=u"""The [OCID] of the hosted application.""")
+@cli_util.option('--compartment-id', required=True, help=u"""The OCID of the compartment to move the hosted application to.""")
+@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_hosted_application_iam_compartment(ctx, from_json, hosted_application_iam_id, compartment_id, if_match):
+
+ if isinstance(hosted_application_iam_id, six.string_types) and len(hosted_application_iam_id.strip()) == 0:
+ raise click.UsageError('Parameter --hosted-application-iam-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('generative_ai', 'generative_ai', ctx)
+ result = client.change_hosted_application_iam_compartment(
+ hosted_application_iam_id=hosted_application_iam_id,
+ change_hosted_application_compartment_details=_details,
+ **kwargs
+ )
+ cli_util.render_response(result, ctx)
+
+
@hosted_application_storage_group.command(name=cli_util.override('generative_ai.change_hosted_application_storage_compartment.command_name', 'change-compartment'), help=u"""Moves a hosted application storage into a different compartment within the same tenancy. For information about moving resources between compartments, see [Moving Resources to a Different Compartment]. \n[Command Reference](changeHostedApplicationStorageCompartment)""")
@cli_util.option('--hosted-application-storage-id', required=True, help=u"""The [OCID] of the hosted application storage.""")
@cli_util.option('--compartment-id', required=True, help=u"""The OCID of the compartment to move the hosted application storage to.""")
@@ -1283,11 +1327,11 @@ def create_generative_ai_project(ctx, from_json, wait_for_state, max_wait_second
@hosted_application_group.command(name=cli_util.override('generative_ai.create_hosted_application.command_name', 'create'), help=u"""Creates a hosted application. \n[Command Reference](createHostedApplication)""")
+@cli_util.option('--inbound-auth-config', required=True, type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
@cli_util.option('--display-name', required=True, help=u"""The user-friendly display name for the Hosted Application. Does not need to be unique and can be updated after creation.""")
@cli_util.option('--compartment-id', required=True, help=u"""The compartment OCID for the Hosted Application.""")
@cli_util.option('--description', help=u"""The description for the Hosted Application.""")
@cli_util.option('--scaling-config', type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
-@cli_util.option('--inbound-auth-config', type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
@cli_util.option('--networking-config', type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
@cli_util.option('--storage-configs', type=custom_types.CLI_COMPLEX_TYPE, help=u"""The list of storage configuration for the Hosted Application. Defines a list of service-managed storage back-ends.
@@ -1304,17 +1348,18 @@ def create_generative_ai_project(ctx, from_json, wait_for_state, max_wait_second
@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "WAITING", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED"]), 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 ACCEPTED --wait-for-state CANCELED 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({'scaling-config': {'module': 'generative_ai', 'class': 'ScalingConfig'}, 'inbound-auth-config': {'module': 'generative_ai', 'class': 'InboundAuthConfig'}, 'networking-config': {'module': 'generative_ai', 'class': 'NetworkingConfig'}, 'storage-configs': {'module': 'generative_ai', 'class': 'list[StorageConfig]'}, 'environment-variables': {'module': 'generative_ai', 'class': 'list[EnvironmentVariable]'}, 'freeform-tags': {'module': 'generative_ai', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'generative_ai', 'class': 'dict(str, dict(str, object))'}})
+@json_skeleton_utils.get_cli_json_input_option({'inbound-auth-config': {'module': 'generative_ai', 'class': 'InboundAuthConfig'}, 'scaling-config': {'module': 'generative_ai', 'class': 'ScalingConfig'}, 'networking-config': {'module': 'generative_ai', 'class': 'NetworkingConfig'}, 'storage-configs': {'module': 'generative_ai', 'class': 'list[StorageConfig]'}, 'environment-variables': {'module': 'generative_ai', 'class': 'list[EnvironmentVariable]'}, 'freeform-tags': {'module': 'generative_ai', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'generative_ai', 'class': 'dict(str, dict(str, object))'}})
@cli_util.help_option
@click.pass_context
-@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'scaling-config': {'module': 'generative_ai', 'class': 'ScalingConfig'}, 'inbound-auth-config': {'module': 'generative_ai', 'class': 'InboundAuthConfig'}, 'networking-config': {'module': 'generative_ai', 'class': 'NetworkingConfig'}, 'storage-configs': {'module': 'generative_ai', 'class': 'list[StorageConfig]'}, 'environment-variables': {'module': 'generative_ai', 'class': 'list[EnvironmentVariable]'}, 'freeform-tags': {'module': 'generative_ai', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'generative_ai', 'class': 'dict(str, dict(str, object))'}}, output_type={'module': 'generative_ai', 'class': 'HostedApplication'})
+@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'inbound-auth-config': {'module': 'generative_ai', 'class': 'InboundAuthConfig'}, 'scaling-config': {'module': 'generative_ai', 'class': 'ScalingConfig'}, 'networking-config': {'module': 'generative_ai', 'class': 'NetworkingConfig'}, 'storage-configs': {'module': 'generative_ai', 'class': 'list[StorageConfig]'}, 'environment-variables': {'module': 'generative_ai', 'class': 'list[EnvironmentVariable]'}, 'freeform-tags': {'module': 'generative_ai', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'generative_ai', 'class': 'dict(str, dict(str, object))'}}, output_type={'module': 'generative_ai', 'class': 'HostedApplication'})
@cli_util.wrap_exceptions
-def create_hosted_application(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, display_name, compartment_id, description, scaling_config, inbound_auth_config, networking_config, storage_configs, environment_variables, freeform_tags, defined_tags):
+def create_hosted_application(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, inbound_auth_config, display_name, compartment_id, description, scaling_config, networking_config, storage_configs, environment_variables, freeform_tags, defined_tags):
kwargs = {}
kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
_details = {}
+ _details['inboundAuthConfig'] = cli_util.parse_json_parameter("inbound_auth_config", inbound_auth_config)
_details['displayName'] = display_name
_details['compartmentId'] = compartment_id
@@ -1324,9 +1369,6 @@ def create_hosted_application(ctx, from_json, wait_for_state, max_wait_seconds,
if scaling_config is not None:
_details['scalingConfig'] = cli_util.parse_json_parameter("scaling_config", scaling_config)
- if inbound_auth_config is not None:
- _details['inboundAuthConfig'] = cli_util.parse_json_parameter("inbound_auth_config", inbound_auth_config)
-
if networking_config is not None:
_details['networkingConfig'] = cli_util.parse_json_parameter("networking_config", networking_config)
@@ -1377,6 +1419,97 @@ def create_hosted_application(ctx, from_json, wait_for_state, max_wait_seconds,
cli_util.render_response(result, ctx)
+@hosted_application_iam_group.command(name=cli_util.override('generative_ai.create_hosted_application_iam.command_name', 'create'), help=u"""Creates a hosted application. \n[Command Reference](createHostedApplicationIam)""")
+@cli_util.option('--display-name', required=True, help=u"""The user-friendly display name for the Hosted Application. Does not need to be unique and can be updated after creation.""")
+@cli_util.option('--compartment-id', required=True, help=u"""The compartment OCID for the Hosted Application.""")
+@cli_util.option('--description', help=u"""The description for the Hosted Application.""")
+@cli_util.option('--scaling-config', type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
+@cli_util.option('--networking-config', type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
+@cli_util.option('--storage-configs', type=custom_types.CLI_COMPLEX_TYPE, help=u"""The list of storage configuration for the Hosted Application. Defines a list of service-managed storage back-ends.
+
+This option is a JSON list with items of type StorageConfig. For documentation on StorageConfig please see our API reference: https://docs.oracle.com/en-us/iaas/api/#/en/generativeai/20231130/datatypes/StorageConfig.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
+@cli_util.option('--environment-variables', type=custom_types.CLI_COMPLEX_TYPE, help=u"""The list of environment variables for the Hosted Application. Defines a list of environment variables injected at runtime.
+
+This option is a JSON list with items of type EnvironmentVariable. For documentation on EnvironmentVariable please see our API reference: https://docs.oracle.com/en-us/iaas/api/#/en/generativeai/20231130/datatypes/EnvironmentVariable.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
+@cli_util.option('--freeform-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags].
+
+Example: `{\"Department\": \"Finance\"}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
+@cli_util.option('--defined-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags].
+
+Example: `{\"Operations\": {\"CostCenter\": \"42\"}}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
+@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "WAITING", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED"]), 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 ACCEPTED --wait-for-state CANCELED 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({'scaling-config': {'module': 'generative_ai', 'class': 'ScalingConfig'}, 'networking-config': {'module': 'generative_ai', 'class': 'NetworkingConfig'}, 'storage-configs': {'module': 'generative_ai', 'class': 'list[StorageConfig]'}, 'environment-variables': {'module': 'generative_ai', 'class': 'list[EnvironmentVariable]'}, 'freeform-tags': {'module': 'generative_ai', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'generative_ai', 'class': 'dict(str, dict(str, object))'}})
+@cli_util.help_option
+@click.pass_context
+@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'scaling-config': {'module': 'generative_ai', 'class': 'ScalingConfig'}, 'networking-config': {'module': 'generative_ai', 'class': 'NetworkingConfig'}, 'storage-configs': {'module': 'generative_ai', 'class': 'list[StorageConfig]'}, 'environment-variables': {'module': 'generative_ai', 'class': 'list[EnvironmentVariable]'}, 'freeform-tags': {'module': 'generative_ai', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'generative_ai', 'class': 'dict(str, dict(str, object))'}}, output_type={'module': 'generative_ai', 'class': 'HostedApplicationIam'})
+@cli_util.wrap_exceptions
+def create_hosted_application_iam(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, display_name, compartment_id, description, scaling_config, networking_config, storage_configs, environment_variables, freeform_tags, defined_tags):
+
+ kwargs = {}
+ kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
+
+ _details = {}
+ _details['displayName'] = display_name
+ _details['compartmentId'] = compartment_id
+
+ if description is not None:
+ _details['description'] = description
+
+ if scaling_config is not None:
+ _details['scalingConfig'] = cli_util.parse_json_parameter("scaling_config", scaling_config)
+
+ if networking_config is not None:
+ _details['networkingConfig'] = cli_util.parse_json_parameter("networking_config", networking_config)
+
+ if storage_configs is not None:
+ _details['storageConfigs'] = cli_util.parse_json_parameter("storage_configs", storage_configs)
+
+ if environment_variables is not None:
+ _details['environmentVariables'] = cli_util.parse_json_parameter("environment_variables", environment_variables)
+
+ if freeform_tags is not None:
+ _details['freeformTags'] = cli_util.parse_json_parameter("freeform_tags", freeform_tags)
+
+ if defined_tags is not None:
+ _details['definedTags'] = cli_util.parse_json_parameter("defined_tags", defined_tags)
+
+ client = cli_util.build_client('generative_ai', 'generative_ai', ctx)
+ result = client.create_hosted_application_iam(
+ create_hosted_application_iam_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)
+
+
@hosted_application_storage_group.command(name=cli_util.override('generative_ai.create_hosted_application_storage.command_name', 'create'), help=u"""Creates a hosted application storage. \n[Command Reference](createHostedApplicationStorage)""")
@cli_util.option('--display-name', required=True, help=u"""A user-friendly name. Does not have to be unique, and it's changeable.""")
@cli_util.option('--compartment-id', required=True, help=u"""The compartment OCID to create the hosted application in.""")
@@ -1451,10 +1584,10 @@ def create_hosted_application_storage(ctx, from_json, wait_for_state, max_wait_s
@hosted_deployment_group.command(name=cli_util.override('generative_ai.create_hosted_deployment.command_name', 'create'), help=u"""Creates a hosted deployment. \n[Command Reference](createHostedDeployment)""")
-@cli_util.option('--hosted-application-id', required=True, help=u"""The [OCID] of the application.""")
@cli_util.option('--active-artifact', 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 name. Does not have to be unique, and it's changeable.""")
@cli_util.option('--compartment-id', help=u"""The compartment OCID to create the hosted deployment in.""")
+@cli_util.option('--hosted-application-id', help=u"""The [OCID] of the HostedApplication parent.""")
@cli_util.option('--freeform-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags].
Example: `{\"Department\": \"Finance\"}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
@@ -1469,13 +1602,12 @@ def create_hosted_application_storage(ctx, from_json, wait_for_state, max_wait_s
@click.pass_context
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'active-artifact': {'module': 'generative_ai', 'class': 'Artifact'}, 'freeform-tags': {'module': 'generative_ai', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'generative_ai', 'class': 'dict(str, dict(str, object))'}}, output_type={'module': 'generative_ai', 'class': 'HostedDeployment'})
@cli_util.wrap_exceptions
-def create_hosted_deployment(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, hosted_application_id, active_artifact, display_name, compartment_id, freeform_tags, defined_tags):
+def create_hosted_deployment(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, active_artifact, display_name, compartment_id, hosted_application_id, freeform_tags, defined_tags):
kwargs = {}
kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
_details = {}
- _details['hostedApplicationId'] = hosted_application_id
_details['activeArtifact'] = cli_util.parse_json_parameter("active_artifact", active_artifact)
if display_name is not None:
@@ -1484,6 +1616,9 @@ def create_hosted_deployment(ctx, from_json, wait_for_state, max_wait_seconds, w
if compartment_id is not None:
_details['compartmentId'] = compartment_id
+ if hosted_application_id is not None:
+ _details['hostedApplicationId'] = hosted_application_id
+
if freeform_tags is not None:
_details['freeformTags'] = cli_util.parse_json_parameter("freeform_tags", freeform_tags)
@@ -1526,9 +1661,9 @@ def create_hosted_deployment(ctx, from_json, wait_for_state, max_wait_seconds, w
@hosted_deployment_group.command(name=cli_util.override('generative_ai.create_hosted_deployment_single_docker_artifact.command_name', 'create-hosted-deployment-single-docker-artifact'), help=u"""Creates a hosted deployment. \n[Command Reference](createHostedDeployment)""")
-@cli_util.option('--hosted-application-id', required=True, help=u"""The [OCID] of the application.""")
@cli_util.option('--display-name', help=u"""A user-friendly name. Does not have to be unique, and it's changeable.""")
@cli_util.option('--compartment-id', help=u"""The compartment OCID to create the hosted deployment in.""")
+@cli_util.option('--hosted-application-id', help=u"""The [OCID] of the HostedApplication parent.""")
@cli_util.option('--freeform-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags].
Example: `{\"Department\": \"Finance\"}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
@@ -1538,7 +1673,8 @@ def create_hosted_deployment(ctx, from_json, wait_for_state, max_wait_seconds, w
@cli_util.option('--active-artifact-id', help=u"""if put artifact to a table, the id is needed""")
@cli_util.option('--active-artifact-time-created', type=custom_types.CLI_DATETIME, help=u"""The date and time the artifact was created.""" + custom_types.CLI_DATETIME.VALID_DATETIME_CLI_HELP_MESSAGE)
@cli_util.option('--active-artifact-hosted-deployment-id', help=u"""The [OCID] of the application.""")
-@cli_util.option('--active-artifact-status', type=custom_types.CliCaseInsensitiveChoice(["ACTIVE", "INACTIVE", "UPDATING"]), help=u"""The current status of the artifact.""")
+@cli_util.option('--active-artifact-is-vulnerability-scan-required', type=click.BOOL, help=u"""Optional flag that requires an OCI Vulnerability Scanning Service compliance report for this artifact before it can become active. When not provided, the value defaults to false and the artifact is not blocked on a scan result.""")
+@cli_util.option('--active-artifact-status', type=custom_types.CliCaseInsensitiveChoice(["ACTIVE", "INACTIVE", "UPDATING", "FAILED"]), help=u"""The current status of the artifact.""")
@cli_util.option('--active-artifact-container-uri', help=u"""image url.""")
@cli_util.option('--active-artifact-tag', help=u"""image tag.""")
@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "WAITING", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED"]), 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 ACCEPTED --wait-for-state CANCELED 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.""")
@@ -1549,14 +1685,13 @@ def create_hosted_deployment(ctx, from_json, wait_for_state, max_wait_seconds, w
@click.pass_context
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'freeform-tags': {'module': 'generative_ai', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'generative_ai', 'class': 'dict(str, dict(str, object))'}}, output_type={'module': 'generative_ai', 'class': 'HostedDeployment'})
@cli_util.wrap_exceptions
-def create_hosted_deployment_single_docker_artifact(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, hosted_application_id, display_name, compartment_id, freeform_tags, defined_tags, active_artifact_id, active_artifact_time_created, active_artifact_hosted_deployment_id, active_artifact_status, active_artifact_container_uri, active_artifact_tag):
+def create_hosted_deployment_single_docker_artifact(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, display_name, compartment_id, hosted_application_id, freeform_tags, defined_tags, active_artifact_id, active_artifact_time_created, active_artifact_hosted_deployment_id, active_artifact_is_vulnerability_scan_required, active_artifact_status, active_artifact_container_uri, active_artifact_tag):
kwargs = {}
kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
_details = {}
_details['activeArtifact'] = {}
- _details['hostedApplicationId'] = hosted_application_id
if display_name is not None:
_details['displayName'] = display_name
@@ -1564,6 +1699,9 @@ def create_hosted_deployment_single_docker_artifact(ctx, from_json, wait_for_sta
if compartment_id is not None:
_details['compartmentId'] = compartment_id
+ if hosted_application_id is not None:
+ _details['hostedApplicationId'] = hosted_application_id
+
if freeform_tags is not None:
_details['freeformTags'] = cli_util.parse_json_parameter("freeform_tags", freeform_tags)
@@ -1579,6 +1717,9 @@ def create_hosted_deployment_single_docker_artifact(ctx, from_json, wait_for_sta
if active_artifact_hosted_deployment_id is not None:
_details['activeArtifact']['hostedDeploymentId'] = active_artifact_hosted_deployment_id
+ if active_artifact_is_vulnerability_scan_required is not None:
+ _details['activeArtifact']['isVulnerabilityScanRequired'] = active_artifact_is_vulnerability_scan_required
+
if active_artifact_status is not None:
_details['activeArtifact']['status'] = active_artifact_status
@@ -3264,6 +3405,62 @@ def delete_hosted_application(ctx, from_json, wait_for_state, max_wait_seconds,
cli_util.render_response(result, ctx)
+@hosted_application_iam_group.command(name=cli_util.override('generative_ai.delete_hosted_application_iam.command_name', 'delete'), help=u"""Deletes a hosted application. You can only delete hosted application without attached resources. Before you delete a hosting hosted application, you must delete the endpoints associated to that application. Before you delete a fine-tuning hosted application, you must delete the custom model on that application. The delete action permanently deletes the cluster. This action can't be undone. \n[Command Reference](deleteHostedApplicationIam)""")
+@cli_util.option('--hosted-application-iam-id', required=True, help=u"""The [OCID] of the hosted application.""")
+@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", "WAITING", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED"]), 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 ACCEPTED --wait-for-state CANCELED 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_hosted_application_iam(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, hosted_application_iam_id, if_match):
+
+ if isinstance(hosted_application_iam_id, six.string_types) and len(hosted_application_iam_id.strip()) == 0:
+ raise click.UsageError('Parameter --hosted-application-iam-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('generative_ai', 'generative_ai', ctx)
+ result = client.delete_hosted_application_iam(
+ hosted_application_iam_id=hosted_application_iam_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)
+
+
@hosted_application_storage_group.command(name=cli_util.override('generative_ai.delete_hosted_application_storage.command_name', 'delete'), help=u"""Deletes a hosted application. You can only delete hosted application without attached resources. Before you delete a hosting hosted application, you must delete the endpoints associated to that application. Before you delete a fine-tuning hosted application, you must delete the custom model on that application. The delete action permanently deletes the cluster. This action can't be undone. \n[Command Reference](deleteHostedApplicationStorage)""")
@cli_util.option('--hosted-application-storage-id', required=True, help=u"""The [OCID] of the hosted application storage.""")
@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.""")
@@ -3793,6 +3990,28 @@ def get_hosted_application(ctx, from_json, hosted_application_id):
cli_util.render_response(result, ctx)
+@hosted_application_iam_group.command(name=cli_util.override('generative_ai.get_hosted_application_iam.command_name', 'get'), help=u"""Gets information about a hosted application. \n[Command Reference](getHostedApplicationIam)""")
+@cli_util.option('--hosted-application-iam-id', required=True, help=u"""The [OCID] of the hosted application.""")
+@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': 'generative_ai', 'class': 'HostedApplicationIam'})
+@cli_util.wrap_exceptions
+def get_hosted_application_iam(ctx, from_json, hosted_application_iam_id):
+
+ if isinstance(hosted_application_iam_id, six.string_types) and len(hosted_application_iam_id.strip()) == 0:
+ raise click.UsageError('Parameter --hosted-application-iam-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('generative_ai', 'generative_ai', ctx)
+ result = client.get_hosted_application_iam(
+ hosted_application_iam_id=hosted_application_iam_id,
+ **kwargs
+ )
+ cli_util.render_response(result, ctx)
+
+
@hosted_application_storage_group.command(name=cli_util.override('generative_ai.get_hosted_application_storage.command_name', 'get'), help=u"""Gets information about a hosted application storage. \n[Command Reference](getHostedApplicationStorage)""")
@cli_util.option('--hosted-application-storage-id', required=True, help=u"""The [OCID] of the hosted application storage.""")
@json_skeleton_utils.get_cli_json_input_option({})
@@ -4441,10 +4660,73 @@ def list_hosted_applications(ctx, from_json, all_pages, page_size, compartment_i
cli_util.render_response(result, ctx)
-@hosted_deployment_collection_group.command(name=cli_util.override('generative_ai.list_hosted_deployments.command_name', 'list-hosted-deployments'), help=u"""Lists the hosted applications in a specific compartment. \n[Command Reference](listHostedDeployments)""")
+@hosted_application_collection_group.command(name=cli_util.override('generative_ai.list_hosted_applications_iam.command_name', 'list-hosted-applications-iam'), help=u"""Lists the hosted applications in a specific compartment. \n[Command Reference](listHostedApplicationsIam)""")
+@cli_util.option('--compartment-id', required=True, help=u"""The [OCID] of the compartment in which to list resources.""")
+@cli_util.option('--lifecycle-state', type=custom_types.CliCaseInsensitiveChoice(["CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED"]), help=u"""A filter to return only the hosted applications that their lifecycle state matches the given lifecycle state.""")
+@cli_util.option('--display-name', help=u"""A filter to return only resources that match the given display name exactly.""")
+@cli_util.option('--id', help=u"""The [OCID] of the hosted application.""")
+@cli_util.option('--limit', type=click.INT, help=u"""For list pagination. The maximum number of results per page, or items to return in a paginated \"List\" call. For important details about how pagination works, see [List Pagination].""")
+@cli_util.option('--page', help=u"""For list pagination. The value of the opc-next-page response header from the previous \"List\" call. For important details about how pagination works, see [List Pagination].""")
+@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", "lifecycleState"]), help=u"""The field to sort by. You can provide only one sort order. 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': 'generative_ai', 'class': 'HostedApplicationCollection'})
+@cli_util.wrap_exceptions
+def list_hosted_applications_iam(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('generative_ai', 'generative_ai', ctx)
+ if all_pages:
+ if page_size:
+ kwargs['limit'] = page_size
+
+ result = cli_util.list_call_get_all_results(
+ client.list_hosted_applications_iam,
+ compartment_id=compartment_id,
+ **kwargs
+ )
+ elif limit is not None:
+ result = cli_util.list_call_get_up_to_limit(
+ client.list_hosted_applications_iam,
+ limit,
+ page_size,
+ compartment_id=compartment_id,
+ **kwargs
+ )
+ else:
+ result = client.list_hosted_applications_iam(
+ compartment_id=compartment_id,
+ **kwargs
+ )
+ cli_util.render_response(result, ctx)
+
+
+@hosted_deployment_collection_group.command(name=cli_util.override('generative_ai.list_hosted_deployments.command_name', 'list-hosted-deployments'), help=u"""Lists the hosted applications in a specific compartment. Provide either applicationId or applicationIamId to filter by parent. \n[Command Reference](listHostedDeployments)""")
@cli_util.option('--compartment-id', required=True, help=u"""The [OCID] of the compartment in which to list resources.""")
-@cli_util.option('--application-id', help=u"""The [OCID] of the hosted application.""")
-@cli_util.option('--lifecycle-state', type=custom_types.CliCaseInsensitiveChoice(["CREATING", "ACTIVE", "INACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED"]), help=u"""A filter to return only the hosted deployments that their lifecycle state matches the given lifecycle state.""")
+@cli_util.option('--application-id', help=u"""The [OCID] of the HostedApplication parent.""")
+@cli_util.option('--lifecycle-state', type=custom_types.CliCaseInsensitiveChoice(["CREATING", "NEEDS_ATTENTION", "ACTIVE", "INACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED"]), help=u"""A filter to return only the hosted deployments that their lifecycle state matches the given lifecycle state.""")
@cli_util.option('--display-name', help=u"""A filter to return only resources that match the given display name exactly.""")
@cli_util.option('--id', help=u"""The [OCID] of the hosted deployment.""")
@cli_util.option('--limit', type=click.INT, help=u"""For list pagination. The maximum number of results per page, or items to return in a paginated \"List\" call. For important details about how pagination works, see [List Pagination].""")
@@ -5745,10 +6027,10 @@ def update_generative_ai_project(ctx, from_json, force, wait_for_state, max_wait
@hosted_application_group.command(name=cli_util.override('generative_ai.update_hosted_application.command_name', 'update'), help=u"""Updates a hosted application. \n[Command Reference](updateHostedApplication)""")
@cli_util.option('--hosted-application-id', required=True, help=u"""The [OCID] of the hosted application.""")
+@cli_util.option('--inbound-auth-config', 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 name. Does not have to be unique, and it's changeable.""")
@cli_util.option('--description', help=u"""An optional description of the hosted application.""")
@cli_util.option('--scaling-config', type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
-@cli_util.option('--inbound-auth-config', type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
@cli_util.option('--environment-variables', type=custom_types.CLI_COMPLEX_TYPE, help=u"""The list of environment variables for the Hosted Application. Defines a list of environment variables injected at runtime.
This option is a JSON list with items of type EnvironmentVariable. For documentation on EnvironmentVariable please see our API reference: https://docs.oracle.com/en-us/iaas/api/#/en/generativeai/20231130/datatypes/EnvironmentVariable.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
@@ -5763,18 +6045,18 @@ def update_generative_ai_project(ctx, from_json, force, wait_for_state, max_wait
@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "WAITING", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED"]), 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 ACCEPTED --wait-for-state CANCELED 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({'scaling-config': {'module': 'generative_ai', 'class': 'ScalingConfig'}, 'inbound-auth-config': {'module': 'generative_ai', 'class': 'InboundAuthConfig'}, 'environment-variables': {'module': 'generative_ai', 'class': 'list[EnvironmentVariable]'}, 'freeform-tags': {'module': 'generative_ai', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'generative_ai', 'class': 'dict(str, dict(str, object))'}})
+@json_skeleton_utils.get_cli_json_input_option({'inbound-auth-config': {'module': 'generative_ai', 'class': 'InboundAuthConfig'}, 'scaling-config': {'module': 'generative_ai', 'class': 'ScalingConfig'}, 'environment-variables': {'module': 'generative_ai', 'class': 'list[EnvironmentVariable]'}, 'freeform-tags': {'module': 'generative_ai', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'generative_ai', 'class': 'dict(str, dict(str, object))'}})
@cli_util.help_option
@click.pass_context
-@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'scaling-config': {'module': 'generative_ai', 'class': 'ScalingConfig'}, 'inbound-auth-config': {'module': 'generative_ai', 'class': 'InboundAuthConfig'}, 'environment-variables': {'module': 'generative_ai', 'class': 'list[EnvironmentVariable]'}, 'freeform-tags': {'module': 'generative_ai', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'generative_ai', 'class': 'dict(str, dict(str, object))'}})
+@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'inbound-auth-config': {'module': 'generative_ai', 'class': 'InboundAuthConfig'}, 'scaling-config': {'module': 'generative_ai', 'class': 'ScalingConfig'}, 'environment-variables': {'module': 'generative_ai', 'class': 'list[EnvironmentVariable]'}, 'freeform-tags': {'module': 'generative_ai', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'generative_ai', 'class': 'dict(str, dict(str, object))'}})
@cli_util.wrap_exceptions
-def update_hosted_application(ctx, from_json, force, wait_for_state, max_wait_seconds, wait_interval_seconds, hosted_application_id, display_name, description, scaling_config, inbound_auth_config, environment_variables, freeform_tags, defined_tags, if_match):
+def update_hosted_application(ctx, from_json, force, wait_for_state, max_wait_seconds, wait_interval_seconds, hosted_application_id, inbound_auth_config, display_name, description, scaling_config, environment_variables, freeform_tags, defined_tags, if_match):
if isinstance(hosted_application_id, six.string_types) and len(hosted_application_id.strip()) == 0:
raise click.UsageError('Parameter --hosted-application-id cannot be whitespace or empty string')
if not force:
- if scaling_config or inbound_auth_config or environment_variables or freeform_tags or defined_tags:
- if not click.confirm("WARNING: Updates to scaling-config and inbound-auth-config and environment-variables and freeform-tags and defined-tags will replace any existing values. Are you sure you want to continue?"):
+ if inbound_auth_config or scaling_config or environment_variables or freeform_tags or defined_tags:
+ if not click.confirm("WARNING: Updates to inbound-auth-config and scaling-config and environment-variables and freeform-tags and defined-tags will replace any existing values. Are you sure you want to continue?"):
ctx.abort()
kwargs = {}
@@ -5784,6 +6066,9 @@ def update_hosted_application(ctx, from_json, force, wait_for_state, max_wait_se
_details = {}
+ if inbound_auth_config is not None:
+ _details['inboundAuthConfig'] = cli_util.parse_json_parameter("inbound_auth_config", inbound_auth_config)
+
if display_name is not None:
_details['displayName'] = display_name
@@ -5793,9 +6078,6 @@ def update_hosted_application(ctx, from_json, force, wait_for_state, max_wait_se
if scaling_config is not None:
_details['scalingConfig'] = cli_util.parse_json_parameter("scaling_config", scaling_config)
- if inbound_auth_config is not None:
- _details['inboundAuthConfig'] = cli_util.parse_json_parameter("inbound_auth_config", inbound_auth_config)
-
if environment_variables is not None:
_details['environmentVariables'] = cli_util.parse_json_parameter("environment_variables", environment_variables)
@@ -5841,6 +6123,100 @@ def update_hosted_application(ctx, from_json, force, wait_for_state, max_wait_se
cli_util.render_response(result, ctx)
+@hosted_application_iam_group.command(name=cli_util.override('generative_ai.update_hosted_application_iam.command_name', 'update'), help=u"""Updates a hosted application. \n[Command Reference](updateHostedApplicationIam)""")
+@cli_util.option('--hosted-application-iam-id', required=True, help=u"""The [OCID] of the hosted application.""")
+@cli_util.option('--display-name', help=u"""A user-friendly name. Does not have to be unique, and it's changeable.""")
+@cli_util.option('--description', help=u"""An optional description of the hosted application.""")
+@cli_util.option('--scaling-config', type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
+@cli_util.option('--environment-variables', type=custom_types.CLI_COMPLEX_TYPE, help=u"""The list of environment variables for the Hosted Application. Defines a list of environment variables injected at runtime.
+
+This option is a JSON list with items of type EnvironmentVariable. For documentation on EnvironmentVariable please see our API reference: https://docs.oracle.com/en-us/iaas/api/#/en/generativeai/20231130/datatypes/EnvironmentVariable.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
+@cli_util.option('--freeform-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags].
+
+Example: `{\"Department\": \"Finance\"}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
+@cli_util.option('--defined-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags].
+
+Example: `{\"Operations\": {\"CostCenter\": \"42\"}}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
+@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('--force', help="""Perform update without prompting for confirmation.""", is_flag=True)
+@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "WAITING", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED"]), 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 ACCEPTED --wait-for-state CANCELED 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({'scaling-config': {'module': 'generative_ai', 'class': 'ScalingConfig'}, 'environment-variables': {'module': 'generative_ai', 'class': 'list[EnvironmentVariable]'}, 'freeform-tags': {'module': 'generative_ai', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'generative_ai', 'class': 'dict(str, dict(str, object))'}})
+@cli_util.help_option
+@click.pass_context
+@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'scaling-config': {'module': 'generative_ai', 'class': 'ScalingConfig'}, 'environment-variables': {'module': 'generative_ai', 'class': 'list[EnvironmentVariable]'}, 'freeform-tags': {'module': 'generative_ai', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'generative_ai', 'class': 'dict(str, dict(str, object))'}})
+@cli_util.wrap_exceptions
+def update_hosted_application_iam(ctx, from_json, force, wait_for_state, max_wait_seconds, wait_interval_seconds, hosted_application_iam_id, display_name, description, scaling_config, environment_variables, freeform_tags, defined_tags, if_match):
+
+ if isinstance(hosted_application_iam_id, six.string_types) and len(hosted_application_iam_id.strip()) == 0:
+ raise click.UsageError('Parameter --hosted-application-iam-id cannot be whitespace or empty string')
+ if not force:
+ if scaling_config or environment_variables or freeform_tags or defined_tags:
+ if not click.confirm("WARNING: Updates to scaling-config and environment-variables and freeform-tags and defined-tags will replace any existing values. Are you sure you want to continue?"):
+ ctx.abort()
+
+ 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
+
+ if scaling_config is not None:
+ _details['scalingConfig'] = cli_util.parse_json_parameter("scaling_config", scaling_config)
+
+ if environment_variables is not None:
+ _details['environmentVariables'] = cli_util.parse_json_parameter("environment_variables", environment_variables)
+
+ if freeform_tags is not None:
+ _details['freeformTags'] = cli_util.parse_json_parameter("freeform_tags", freeform_tags)
+
+ if defined_tags is not None:
+ _details['definedTags'] = cli_util.parse_json_parameter("defined_tags", defined_tags)
+
+ client = cli_util.build_client('generative_ai', 'generative_ai', ctx)
+ result = client.update_hosted_application_iam(
+ hosted_application_iam_id=hosted_application_iam_id,
+ update_hosted_application_iam_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)
+
+
@hosted_deployment_group.command(name=cli_util.override('generative_ai.update_hosted_deployment.command_name', 'update'), help=u"""Updates a hosted deployment. \n[Command Reference](updateHostedDeployment)""")
@cli_util.option('--hosted-deployment-id', required=True, help=u"""The [OCID] of the hosted deployment.""")
@cli_util.option('--active-artifact', required=True, type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
diff --git a/services/generative_ai/tests/util/generated/command_to_api.py b/services/generative_ai/tests/util/generated/command_to_api.py
index 184d3c436..cf9e2e5de 100644
--- a/services/generative_ai/tests/util/generated/command_to_api.py
+++ b/services/generative_ai/tests/util/generated/command_to_api.py
@@ -10,6 +10,7 @@
"generative_ai.change_generative_ai_private_endpoint_compartment": "oci.generative_ai.GenerativeAiClient.change_generative_ai_private_endpoint_compartment",
"generative_ai.change_generative_ai_project_compartment": "oci.generative_ai.GenerativeAiClient.change_generative_ai_project_compartment",
"generative_ai.change_hosted_application_compartment": "oci.generative_ai.GenerativeAiClient.change_hosted_application_compartment",
+ "generative_ai.change_hosted_application_iam_compartment": "oci.generative_ai.GenerativeAiClient.change_hosted_application_iam_compartment",
"generative_ai.change_hosted_application_storage_compartment": "oci.generative_ai.GenerativeAiClient.change_hosted_application_storage_compartment",
"generative_ai.change_imported_model_compartment": "oci.generative_ai.GenerativeAiClient.change_imported_model_compartment",
"generative_ai.change_model_compartment": "oci.generative_ai.GenerativeAiClient.change_model_compartment",
@@ -20,6 +21,7 @@
"generative_ai.create_generative_ai_private_endpoint": "oci.generative_ai.GenerativeAiClient.create_generative_ai_private_endpoint",
"generative_ai.create_generative_ai_project": "oci.generative_ai.GenerativeAiClient.create_generative_ai_project",
"generative_ai.create_hosted_application": "oci.generative_ai.GenerativeAiClient.create_hosted_application",
+ "generative_ai.create_hosted_application_iam": "oci.generative_ai.GenerativeAiClient.create_hosted_application_iam",
"generative_ai.create_hosted_application_storage": "oci.generative_ai.GenerativeAiClient.create_hosted_application_storage",
"generative_ai.create_hosted_deployment": "oci.generative_ai.GenerativeAiClient.create_hosted_deployment",
"generative_ai.create_imported_model": "oci.generative_ai.GenerativeAiClient.create_imported_model",
@@ -33,6 +35,7 @@
"generative_ai.delete_generative_ai_private_endpoint": "oci.generative_ai.GenerativeAiClient.delete_generative_ai_private_endpoint",
"generative_ai.delete_generative_ai_project": "oci.generative_ai.GenerativeAiClient.delete_generative_ai_project",
"generative_ai.delete_hosted_application": "oci.generative_ai.GenerativeAiClient.delete_hosted_application",
+ "generative_ai.delete_hosted_application_iam": "oci.generative_ai.GenerativeAiClient.delete_hosted_application_iam",
"generative_ai.delete_hosted_application_storage": "oci.generative_ai.GenerativeAiClient.delete_hosted_application_storage",
"generative_ai.delete_hosted_deployment": "oci.generative_ai.GenerativeAiClient.delete_hosted_deployment",
"generative_ai.delete_hosted_deployment_artifact": "oci.generative_ai.GenerativeAiClient.delete_hosted_deployment_artifact",
@@ -46,6 +49,7 @@
"generative_ai.get_generative_ai_private_endpoint": "oci.generative_ai.GenerativeAiClient.get_generative_ai_private_endpoint",
"generative_ai.get_generative_ai_project": "oci.generative_ai.GenerativeAiClient.get_generative_ai_project",
"generative_ai.get_hosted_application": "oci.generative_ai.GenerativeAiClient.get_hosted_application",
+ "generative_ai.get_hosted_application_iam": "oci.generative_ai.GenerativeAiClient.get_hosted_application_iam",
"generative_ai.get_hosted_application_storage": "oci.generative_ai.GenerativeAiClient.get_hosted_application_storage",
"generative_ai.get_hosted_deployment": "oci.generative_ai.GenerativeAiClient.get_hosted_deployment",
"generative_ai.get_imported_model": "oci.generative_ai.GenerativeAiClient.get_imported_model",
@@ -62,6 +66,7 @@
"generative_ai.list_generative_ai_projects": "oci.generative_ai.GenerativeAiClient.list_generative_ai_projects",
"generative_ai.list_hosted_application_storages": "oci.generative_ai.GenerativeAiClient.list_hosted_application_storages",
"generative_ai.list_hosted_applications": "oci.generative_ai.GenerativeAiClient.list_hosted_applications",
+ "generative_ai.list_hosted_applications_iam": "oci.generative_ai.GenerativeAiClient.list_hosted_applications_iam",
"generative_ai.list_hosted_deployments": "oci.generative_ai.GenerativeAiClient.list_hosted_deployments",
"generative_ai.list_imported_models": "oci.generative_ai.GenerativeAiClient.list_imported_models",
"generative_ai.list_models": "oci.generative_ai.GenerativeAiClient.list_models",
@@ -81,6 +86,7 @@
"generative_ai.update_generative_ai_private_endpoint": "oci.generative_ai.GenerativeAiClient.update_generative_ai_private_endpoint",
"generative_ai.update_generative_ai_project": "oci.generative_ai.GenerativeAiClient.update_generative_ai_project",
"generative_ai.update_hosted_application": "oci.generative_ai.GenerativeAiClient.update_hosted_application",
+ "generative_ai.update_hosted_application_iam": "oci.generative_ai.GenerativeAiClient.update_hosted_application_iam",
"generative_ai.update_hosted_deployment": "oci.generative_ai.GenerativeAiClient.update_hosted_deployment",
"generative_ai.update_imported_model": "oci.generative_ai.GenerativeAiClient.update_imported_model",
"generative_ai.update_model": "oci.generative_ai.GenerativeAiClient.update_model",
diff --git a/services/oda/src/oci_cli_management/generated/management_cli.py b/services/oda/src/oci_cli_management/generated/management_cli.py
index 928672977..8880d0ff8 100644
--- a/services/oda/src/oci_cli_management/generated/management_cli.py
+++ b/services/oda/src/oci_cli_management/generated/management_cli.py
@@ -1766,15 +1766,16 @@ def create_digital_assistant_extend_digital_assistant_details(ctx, from_json, wa
@cli_util.option('--nsg-ids', type=custom_types.CLI_COMPLEX_TYPE, help=u"""List of [OCIDs] of [network security groups]""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
@cli_util.option('--freeform-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Simple key-value pair that is applied without any predefined name, type, or scope. Example: `{\"bar-key\": \"value\"}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
@cli_util.option('--defined-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Usage of predefined tag keys. These predefined keys are scoped to namespaces. Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
+@cli_util.option('--security-attributes', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Security attributes for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags]. Example: `{\"Oracle-ZPR\": {\"MaxEgressCount\": {\"value\": \"42\", \"mode\": \"enforce\"}}}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "SUCCEEDED", "FAILED", "CANCELING", "CANCELED"]), 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 ACCEPTED --wait-for-state CANCELED 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({'nsg-ids': {'module': 'oda', 'class': 'list[string]'}, 'freeform-tags': {'module': 'oda', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'oda', 'class': 'dict(str, dict(str, object))'}})
+@json_skeleton_utils.get_cli_json_input_option({'nsg-ids': {'module': 'oda', 'class': 'list[string]'}, 'freeform-tags': {'module': 'oda', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'oda', 'class': 'dict(str, dict(str, object))'}, 'security-attributes': {'module': 'oda', 'class': 'dict(str, dict(str, object))'}})
@cli_util.help_option
@click.pass_context
-@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'nsg-ids': {'module': 'oda', 'class': 'list[string]'}, 'freeform-tags': {'module': 'oda', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'oda', 'class': 'dict(str, dict(str, object))'}}, output_type={'module': 'oda', 'class': 'OdaPrivateEndpoint'})
+@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'nsg-ids': {'module': 'oda', 'class': 'list[string]'}, 'freeform-tags': {'module': 'oda', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'oda', 'class': 'dict(str, dict(str, object))'}, 'security-attributes': {'module': 'oda', 'class': 'dict(str, dict(str, object))'}}, output_type={'module': 'oda', 'class': 'OdaPrivateEndpoint'})
@cli_util.wrap_exceptions
-def create_oda_private_endpoint(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, compartment_id, subnet_id, display_name, description, nsg_ids, freeform_tags, defined_tags):
+def create_oda_private_endpoint(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, compartment_id, subnet_id, display_name, description, nsg_ids, freeform_tags, defined_tags, security_attributes):
kwargs = {}
kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
@@ -1798,6 +1799,9 @@ def create_oda_private_endpoint(ctx, from_json, wait_for_state, max_wait_seconds
if defined_tags is not None:
_details['definedTags'] = cli_util.parse_json_parameter("defined_tags", defined_tags)
+ if security_attributes is not None:
+ _details['securityAttributes'] = cli_util.parse_json_parameter("security_attributes", security_attributes)
+
client = cli_util.build_client('oda', 'management', ctx)
result = client.create_oda_private_endpoint(
create_oda_private_endpoint_details=_details,
@@ -6362,23 +6366,24 @@ def update_digital_assistant_parameter(ctx, from_json, wait_for_state, max_wait_
@cli_util.option('--nsg-ids', type=custom_types.CLI_COMPLEX_TYPE, help=u"""List of [OCIDs] of [network security groups]""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
@cli_util.option('--freeform-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Simple key-value pair that is applied without any predefined name, type, or scope. Example: `{\"bar-key\": \"value\"}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
@cli_util.option('--defined-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Usage of predefined tag keys. These predefined keys are scoped to namespaces. Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
+@cli_util.option('--security-attributes', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Security attributes for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags]. Example: `{\"Oracle-ZPR\": {\"MaxEgressCount\": {\"value\": \"42\", \"mode\": \"enforce\"}}}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
@cli_util.option('--if-match', help=u"""For optimistic concurrency control in a PUT or DELETE call for a Digital Assistant instance, set the `if-match` query parameter to the value of the `ETAG` header from a previous GET or POST response for that instance. The service updates or deletes the instance only if the etag that you provide matches the instance's current etag value.""")
@cli_util.option('--force', help="""Perform update without prompting for confirmation.""", is_flag=True)
@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "SUCCEEDED", "FAILED", "CANCELING", "CANCELED"]), 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 ACCEPTED --wait-for-state CANCELED 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({'nsg-ids': {'module': 'oda', 'class': 'list[string]'}, 'freeform-tags': {'module': 'oda', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'oda', 'class': 'dict(str, dict(str, object))'}})
+@json_skeleton_utils.get_cli_json_input_option({'nsg-ids': {'module': 'oda', 'class': 'list[string]'}, 'freeform-tags': {'module': 'oda', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'oda', 'class': 'dict(str, dict(str, object))'}, 'security-attributes': {'module': 'oda', 'class': 'dict(str, dict(str, object))'}})
@cli_util.help_option
@click.pass_context
-@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'nsg-ids': {'module': 'oda', 'class': 'list[string]'}, 'freeform-tags': {'module': 'oda', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'oda', 'class': 'dict(str, dict(str, object))'}})
+@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'nsg-ids': {'module': 'oda', 'class': 'list[string]'}, 'freeform-tags': {'module': 'oda', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'oda', 'class': 'dict(str, dict(str, object))'}, 'security-attributes': {'module': 'oda', 'class': 'dict(str, dict(str, object))'}})
@cli_util.wrap_exceptions
-def update_oda_private_endpoint(ctx, from_json, force, wait_for_state, max_wait_seconds, wait_interval_seconds, oda_private_endpoint_id, display_name, description, nsg_ids, freeform_tags, defined_tags, if_match):
+def update_oda_private_endpoint(ctx, from_json, force, wait_for_state, max_wait_seconds, wait_interval_seconds, oda_private_endpoint_id, display_name, description, nsg_ids, freeform_tags, defined_tags, security_attributes, if_match):
if isinstance(oda_private_endpoint_id, six.string_types) and len(oda_private_endpoint_id.strip()) == 0:
raise click.UsageError('Parameter --oda-private-endpoint-id cannot be whitespace or empty string')
if not force:
- if nsg_ids or freeform_tags or defined_tags:
- if not click.confirm("WARNING: Updates to nsg-ids and freeform-tags and defined-tags will replace any existing values. Are you sure you want to continue?"):
+ if nsg_ids or freeform_tags or defined_tags or security_attributes:
+ if not click.confirm("WARNING: Updates to nsg-ids and freeform-tags and defined-tags and security-attributes will replace any existing values. Are you sure you want to continue?"):
ctx.abort()
kwargs = {}
@@ -6403,6 +6408,9 @@ def update_oda_private_endpoint(ctx, from_json, force, wait_for_state, max_wait_
if defined_tags is not None:
_details['definedTags'] = cli_util.parse_json_parameter("defined_tags", defined_tags)
+ if security_attributes is not None:
+ _details['securityAttributes'] = cli_util.parse_json_parameter("security_attributes", security_attributes)
+
client = cli_util.build_client('oda', 'management', ctx)
result = client.update_oda_private_endpoint(
oda_private_endpoint_id=oda_private_endpoint_id,
diff --git a/services/os_management_hub/src/oci_cli_onboarding/generated/onboarding_cli.py b/services/os_management_hub/src/oci_cli_onboarding/generated/onboarding_cli.py
index e2b3bb9a5..feea7a528 100644
--- a/services/os_management_hub/src/oci_cli_onboarding/generated/onboarding_cli.py
+++ b/services/os_management_hub/src/oci_cli_onboarding/generated/onboarding_cli.py
@@ -614,13 +614,13 @@ def create_profile_create_station_profile_details(ctx, from_json, wait_for_state
@cli_util.option('--vendor-name', required=True, type=custom_types.CliCaseInsensitiveChoice(["ORACLE", "MICROSOFT", "CANONICAL"]), help=u"""The vendor of the operating system for the instance.""")
@cli_util.option('--os-family', required=True, type=custom_types.CliCaseInsensitiveChoice(["ORACLE_LINUX_10", "ORACLE_LINUX_9", "ORACLE_LINUX_8", "ORACLE_LINUX_7", "ORACLE_LINUX_6", "WINDOWS_SERVER_2016", "WINDOWS_SERVER_2019", "WINDOWS_SERVER_2022", "WINDOWS_SERVER_2025", "WINDOWS_11", "ALL", "UBUNTU_20_04", "UBUNTU_22_04", "UBUNTU_24_04"]), help=u"""The operating system family.""")
@cli_util.option('--arch-type', required=True, type=custom_types.CliCaseInsensitiveChoice(["X86_64", "AARCH64", "I686", "NOARCH", "SRC", "I386", "AMD64", "ARM64", "ALL"]), help=u"""The architecture type.""")
-@cli_util.option('--software-source-ids', required=True, type=custom_types.CLI_COMPLEX_TYPE, help=u"""The list of software source [OCIDs] that the registration profile will use.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
@cli_util.option('--description', help=u"""User-specified description of the registration profile.""")
@cli_util.option('--management-station-id', help=u"""description: The [OCID] of the management station to associate with an instance once registered. This is used when creating a profile for non-OCI instances.""")
@cli_util.option('--registration-type', help=u"""The type of instance to register.""")
@cli_util.option('--is-default-profile', type=click.BOOL, help=u"""Indicates if the profile is set as the default. There is exactly one default profile for a specified architecture, OS family, registration type, and vendor. When registering an instance with the corresonding characteristics, the default profile is used, unless another profile is specified.""")
@cli_util.option('--freeform-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags]. Example: `{\"Department\": \"Finance\"}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
@cli_util.option('--defined-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags]. Example: `{\"Operations\": {\"CostCenter\": \"42\"}}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
+@cli_util.option('--software-source-ids', type=custom_types.CLI_COMPLEX_TYPE, help=u"""The list of software source [OCIDs] that the registration profile will use.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["CREATING", "UPDATING", "ACTIVE", "INACTIVE", "DELETING", "DELETED", "FAILED"]), 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 CREATING --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.""")
@@ -629,7 +629,7 @@ def create_profile_create_station_profile_details(ctx, from_json, wait_for_state
@click.pass_context
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'freeform-tags': {'module': 'os_management_hub', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'os_management_hub', 'class': 'dict(str, dict(str, object))'}, 'software-source-ids': {'module': 'os_management_hub', 'class': 'list[string]'}}, output_type={'module': 'os_management_hub', 'class': 'Profile'})
@cli_util.wrap_exceptions
-def create_profile_create_software_source_profile_details(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, display_name, compartment_id, vendor_name, os_family, arch_type, software_source_ids, description, management_station_id, registration_type, is_default_profile, freeform_tags, defined_tags):
+def create_profile_create_software_source_profile_details(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, display_name, compartment_id, vendor_name, os_family, arch_type, description, management_station_id, registration_type, is_default_profile, freeform_tags, defined_tags, software_source_ids):
kwargs = {}
kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
@@ -640,7 +640,6 @@ def create_profile_create_software_source_profile_details(ctx, from_json, wait_f
_details['vendorName'] = vendor_name
_details['osFamily'] = os_family
_details['archType'] = arch_type
- _details['softwareSourceIds'] = cli_util.parse_json_parameter("software_source_ids", software_source_ids)
if description is not None:
_details['description'] = description
@@ -660,6 +659,9 @@ def create_profile_create_software_source_profile_details(ctx, from_json, wait_f
if defined_tags is not None:
_details['definedTags'] = cli_util.parse_json_parameter("defined_tags", defined_tags)
+ if software_source_ids is not None:
+ _details['softwareSourceIds'] = cli_util.parse_json_parameter("software_source_ids", software_source_ids)
+
_details['profileType'] = 'SOFTWARESOURCE'
client = cli_util.build_client('os_management_hub', 'onboarding', ctx)
diff --git a/setup.py b/setup.py
index 11fef9c1a..8b8b1a1f0 100644
--- a/setup.py
+++ b/setup.py
@@ -30,11 +30,11 @@ def open_relative(*path):
readme = f.read()
requires = [
- 'oci==2.181.1',
+ 'oci==2.182.0',
'arrow>=1.0.0,<2.0.0',
'certifi>=2025.1.31,<2026.0.0',
'click<=8.1.2',
- 'cryptography>=3.2.1,<47.0.0',
+ 'cryptography>=3.2.1,<50.0.0',
'jmespath>=0.10.0,<=1.0.1',
'python-dateutil>=2.5.3,<3.0.0',
'pytz>=2016.10,<=2026.2',
diff --git a/src/oci_cli/service_mapping.py b/src/oci_cli/service_mapping.py
index 605f89785..e01288cf4 100644
--- a/src/oci_cli/service_mapping.py
+++ b/src/oci_cli/service_mapping.py
@@ -248,6 +248,11 @@
"Database Migration",
"Migration"
],
+ "datacc": [
+ "datacc",
+ "Database Infrastructure Cloud@Customer Service",
+ "Others"
+ ],
"db": [
"database",
"Database Service",
diff --git a/src/oci_cli/version.py b/src/oci_cli/version.py
index 438b5ffc7..763b45be8 100644
--- a/src/oci_cli/version.py
+++ b/src/oci_cli/version.py
@@ -2,4 +2,4 @@
# Copyright (c) 2016, 2026, 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.89.1'
+__version__ = '3.89.2'
diff --git a/tests/resources/json_ignore_command_list.txt b/tests/resources/json_ignore_command_list.txt
index 5d128c8cd..559ec527c 100644
--- a/tests/resources/json_ignore_command_list.txt
+++ b/tests/resources/json_ignore_command_list.txt
@@ -610,4 +610,6 @@ dbtools-runtime, database-api-gateway-config-pool-auto-api-spec, create, default
dbtools-runtime, database-api-gateway-config-pool-auto-api-spec, update, default
db, cloud-exa-infra, update
opsi, opsi-private-endpoint, update
+db, database, create-from-backupdata-safe, private-endpoint, update
db, database, create-from-backup
+data-safe, private-endpoint, update