diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 49a98ddea..e3a3ca07c 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -6,6 +6,114 @@ All notable changes to this project will be documented in this file. The format is based on `Keep a Changelog `__. +3.90.0 - 2026-07-28 +------------------- +Added +~~~~~ +* Block Volume Service + + * Support for new optional parameter ``retention-period``, ``is-retention-lock-enabled``, ``is-prevent-deletion-enabled`` and ``is-indefinite-retention-enabled`` + + * ``oci bv backup create`` + * ``oci bv backup update`` + * ``oci bv boot-volume-backup create`` + * ``oci bv volume-group-backup update`` + * ``oci bv volume-group-backup create`` + +* Compute Service + + * Support for new optional parameter ``--is-burstable`` + + * ``oci compute dedicated-vm-host create`` + * ``oci compute dedicated-vm-host create-dedicated-vm-host-compute-bare-metal-host-placement-constraint-details`` + * ``oci compute dedicated-vm-host create-dedicated-vm-host-host-group-placement-constraint-details`` + +* Database Service + + * Support for Oracle Base Database Cloud@Customer (BaseDB-C@C) VM cluster lifecycle, update, and maintenance operations + + * ``oci db basecc-vm-cluster-update-history-entry list`` + * ``oci db basecc-vm-cluster change-compartment`` + * ``oci db basecc-vm-cluster delete`` + * ``oci db basecc-vm-cluster-update-history-entry get`` + * ``oci db basecc-vm-cluster-update list`` + * ``oci db basecc-vm-cluster-update get`` + * ``oci db basecc-vm-cluster list`` + * ``oci db basecc-vm-cluster get`` + * ``oci db basecc-vm-cluster create`` + * ``oci db basecc-vm-cluster update`` + + + * Support for new commands to install or uninstall the PKCS11 driver for a given TDE keystore type on an Exadata VM cluster on Exascale Infrastructure + + * ``oci db exadb-vm-cluster register-exadb-vm-cluster-pkcs`` + * ``oci db exadb-vm-cluster unregister-exadb-vm-cluster-pkcs`` + +* Generative AI Service Management + + * Support for additional H100_X16 and H100_X32 dedicated AI cluster shapes + + * ``oci generative-ai dedicated-ai-cluster create --unit-shape`` + +* GoldenGate + + * Support for AI model connections and AI model/provider collections + + * ``oci goldengate ai-model list`` + * ``oci goldengate ai-provider list`` + * ``oci goldengate connection create-ai-model-connection`` + * ``oci goldengate connection update-ai-model-connection`` + + * Support for new optional parameter ``--connection-type-not-equal-to`` + + * ``oci goldengate connection-assignment list --connection-type-not-equal-to`` + * ``oci goldengate connection list --connection-type-not-equal-to`` + + * Support for new optional parameter ``connection-type`` + + * ``oci goldengate connection-assignment list`` + +* Networking Service + + * Support for new command for listing available provider regions in the Networking service + + * ``oci network provider-remote-region-name list-provider-remote-regions`` + + * Support for new optional parameters ``--provider-remote-region`` and ``--remote-account-id`` + + * ``oci network virtual-circuit create`` + +* Oracle Access Control + + * Support for new optional parameter ``--approver-group-level-list`` + + * ``oci apiaccesscontrol privileged-api-control create --approver-group-level-list`` + * ``oci apiaccesscontrol privileged-api-control update --approver-group-level-list`` + +Changed +~~~~~~~ +* Generative AI Service Management + + * [BREAKING] ``--inbound-auth-config`` is now a required parameter + + * ``oci generative-ai hosted-application create --inbound-auth-config`` + +* Oracle Access Control + + * [BREAKING] ``--compartment-id | -c`` is now a required parameter + + * ``oci apiaccesscontrol api-metadata list`` + * ``oci apiaccesscontrol api-metadata list-api-metadata-by-entity-types`` + * ``oci apiaccesscontrol privileged-api-control list-privileged-api-controls`` + * ``oci apiaccesscontrol privileged-api-work-request list`` + * ``oci apiaccesscontrol privileged-api-requests list-privileged-api-requests`` + * ``oci apiaccesscontrol privileged-api-requests create`` + + * ``--resources`` is now an optional parameter + + * ``oci apiaccesscontrol privileged-api-control create`` + + 3.89.3 - 2026-07-21 ------------------- Added diff --git a/requirements.txt b/requirements.txt index 21d5262ca..e2e2f0346 100644 --- a/requirements.txt +++ b/requirements.txt @@ -16,7 +16,7 @@ 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.182.1 +oci==2.183.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/apiaccesscontrol/src/oci_cli_api_metadata/generated/apimetadata_cli.py b/services/apiaccesscontrol/src/oci_cli_api_metadata/generated/apimetadata_cli.py index 98d32087a..69ca85e2c 100644 --- a/services/apiaccesscontrol/src/oci_cli_api_metadata/generated/apimetadata_cli.py +++ b/services/apiaccesscontrol/src/oci_cli_api_metadata/generated/apimetadata_cli.py @@ -62,7 +62,7 @@ def get_api_metadata(ctx, from_json, api_metadata_id): @api_metadata_group.command(name=cli_util.override('api_metadata.list_api_metadata.command_name', 'list'), help=u"""Gets a list of ApiMetadata. \n[Command Reference](listApiMetadata)""") -@cli_util.option('--compartment-id', help=u"""The [OCID] of the compartment in which to list resources.""") +@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", "UPDATING", "ACTIVE", "DELETING", "DELETED", "FAILED"]), help=u"""A filter to return only resources that match the given lifecycle state. The state value is case-insensitive.""") @cli_util.option('--resource-type', help=u"""A filter to return only lists of resources that match the entire given service type.""") @cli_util.option('--display-name', help=u"""A filter to return only resources that match the given display name exactly.""") @@ -83,8 +83,6 @@ def list_api_metadata(ctx, from_json, all_pages, page_size, compartment_id, life raise click.UsageError('If you provide the --all option you cannot provide the --limit option') kwargs = {} - if compartment_id is not None: - kwargs['compartment_id'] = compartment_id if lifecycle_state is not None: kwargs['lifecycle_state'] = lifecycle_state if resource_type is not None: @@ -107,6 +105,7 @@ def list_api_metadata(ctx, from_json, all_pages, page_size, compartment_id, life result = cli_util.list_call_get_all_results( client.list_api_metadata, + compartment_id=compartment_id, **kwargs ) elif limit is not None: @@ -114,17 +113,19 @@ def list_api_metadata(ctx, from_json, all_pages, page_size, compartment_id, life client.list_api_metadata, limit, page_size, + compartment_id=compartment_id, **kwargs ) else: result = client.list_api_metadata( + compartment_id=compartment_id, **kwargs ) cli_util.render_response(result, ctx) @api_metadata_group.command(name=cli_util.override('api_metadata.list_api_metadata_by_entity_types.command_name', 'list-api-metadata-by-entity-types'), help=u"""Gets a list of ApiMetadata Grouped By Entity Types. \n[Command Reference](listApiMetadataByEntityTypes)""") -@cli_util.option('--compartment-id', help=u"""The [OCID] of the compartment in which to list resources.""") +@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", "UPDATING", "ACTIVE", "DELETING", "DELETED", "FAILED"]), help=u"""A filter to return only resources that match the given lifecycle state. The state value is case-insensitive.""") @cli_util.option('--resource-type', help=u"""A filter to return only lists of resources that match the entire given service type.""") @cli_util.option('--display-name', help=u"""A filter to return only resources that match the given display name exactly.""") @@ -145,8 +146,6 @@ def list_api_metadata_by_entity_types(ctx, from_json, all_pages, page_size, comp raise click.UsageError('If you provide the --all option you cannot provide the --limit option') kwargs = {} - if compartment_id is not None: - kwargs['compartment_id'] = compartment_id if lifecycle_state is not None: kwargs['lifecycle_state'] = lifecycle_state if resource_type is not None: @@ -169,6 +168,7 @@ def list_api_metadata_by_entity_types(ctx, from_json, all_pages, page_size, comp result = cli_util.list_call_get_all_results( client.list_api_metadata_by_entity_types, + compartment_id=compartment_id, **kwargs ) elif limit is not None: @@ -176,10 +176,12 @@ def list_api_metadata_by_entity_types(ctx, from_json, all_pages, page_size, comp client.list_api_metadata_by_entity_types, limit, page_size, + compartment_id=compartment_id, **kwargs ) else: result = client.list_api_metadata_by_entity_types( + compartment_id=compartment_id, **kwargs ) cli_util.render_response(result, ctx) diff --git a/services/apiaccesscontrol/src/oci_cli_privileged_api_control/generated/privilegedapicontrol_cli.py b/services/apiaccesscontrol/src/oci_cli_privileged_api_control/generated/privilegedapicontrol_cli.py index eb0caeadd..4984f78d7 100644 --- a/services/apiaccesscontrol/src/oci_cli_privileged_api_control/generated/privilegedapicontrol_cli.py +++ b/services/apiaccesscontrol/src/oci_cli_privileged_api_control/generated/privilegedapicontrol_cli.py @@ -109,13 +109,16 @@ def change_privileged_api_control_compartment(ctx, from_json, wait_for_state, ma @privileged_api_control_group.command(name=cli_util.override('privileged_api_control.create_privileged_api_control.command_name', 'create'), help=u"""Creates a PrivilegedApiControl. \n[Command Reference](createPrivilegedApiControl)""") @cli_util.option('--compartment-id', required=True, help=u"""The [OCID] of the compartment to create the PrivilegedApiControl in.""") -@cli_util.option('--notification-topic-id', required=True, help=u"""The OCID of the OCI Notification topic to publish messages related to this Delegation Control.""") +@cli_util.option('--notification-topic-id', required=True, help=u"""The OCID of the OCI Notification topic to publish messages related to this Privileged Api Control.""") @cli_util.option('--approver-group-id-list', required=True, type=custom_types.CLI_COMPLEX_TYPE, help=u"""List of user IAM group ids who can approve an privilegedApi request associated with a resource governed by this operator control.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP) @cli_util.option('--privileged-operation-list', required=True, type=custom_types.CLI_COMPLEX_TYPE, help=u"""List of privileged operator operations. If Privileged API Managment is enabled for a resource it will be validated whether the operation done by the operator is a part of privileged operation.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP) @cli_util.option('--resource-type', required=True, help=u"""resourceType for which the PrivilegedApiControl is applicable""") -@cli_util.option('--resources', required=True, type=custom_types.CLI_COMPLEX_TYPE, help=u"""contains Resource details""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP) @cli_util.option('--display-name', help=u"""Name of the privilegedApi control It has to be unique.""") @cli_util.option('--description', help=u"""Description of the privilegedApi control.""") +@cli_util.option('--approver-group-level-list', type=custom_types.CLI_COMPLEX_TYPE, help=u"""List of Group containing the levels at which the users belonging to the group can authorize. + +This option is a JSON list with items of type ApproverGroupLevel. For documentation on ApproverGroupLevel please see our API reference: https://docs.oracle.com/en-us/iaas/api/#/en/privilegedapicontrol/20241130/datatypes/ApproverGroupLevel.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP) +@cli_util.option('--resources', type=custom_types.CLI_COMPLEX_TYPE, help=u"""contains Resource details""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP) @cli_util.option('--number-of-approvers', type=click.INT, help=u"""Number of approvers required to approve an privilegedApi request.""") @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]. @@ -126,12 +129,12 @@ def change_privileged_api_control_compartment(ctx, from_json, wait_for_state, ma @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({'approver-group-id-list': {'module': 'apiaccesscontrol', 'class': 'list[string]'}, 'privileged-operation-list': {'module': 'apiaccesscontrol', 'class': 'list[PrivilegedApiDetails]'}, 'resources': {'module': 'apiaccesscontrol', 'class': 'list[string]'}, 'freeform-tags': {'module': 'apiaccesscontrol', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'apiaccesscontrol', 'class': 'dict(str, dict(str, object))'}}) +@json_skeleton_utils.get_cli_json_input_option({'approver-group-id-list': {'module': 'apiaccesscontrol', 'class': 'list[string]'}, 'approver-group-level-list': {'module': 'apiaccesscontrol', 'class': 'list[ApproverGroupLevel]'}, 'privileged-operation-list': {'module': 'apiaccesscontrol', 'class': 'list[PrivilegedApiDetails]'}, 'resources': {'module': 'apiaccesscontrol', 'class': 'list[string]'}, 'freeform-tags': {'module': 'apiaccesscontrol', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'apiaccesscontrol', '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={'approver-group-id-list': {'module': 'apiaccesscontrol', 'class': 'list[string]'}, 'privileged-operation-list': {'module': 'apiaccesscontrol', 'class': 'list[PrivilegedApiDetails]'}, 'resources': {'module': 'apiaccesscontrol', 'class': 'list[string]'}, 'freeform-tags': {'module': 'apiaccesscontrol', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'apiaccesscontrol', 'class': 'dict(str, dict(str, object))'}}, output_type={'module': 'apiaccesscontrol', 'class': 'PrivilegedApiControl'}) +@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'approver-group-id-list': {'module': 'apiaccesscontrol', 'class': 'list[string]'}, 'approver-group-level-list': {'module': 'apiaccesscontrol', 'class': 'list[ApproverGroupLevel]'}, 'privileged-operation-list': {'module': 'apiaccesscontrol', 'class': 'list[PrivilegedApiDetails]'}, 'resources': {'module': 'apiaccesscontrol', 'class': 'list[string]'}, 'freeform-tags': {'module': 'apiaccesscontrol', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'apiaccesscontrol', 'class': 'dict(str, dict(str, object))'}}, output_type={'module': 'apiaccesscontrol', 'class': 'PrivilegedApiControl'}) @cli_util.wrap_exceptions -def create_privileged_api_control(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, compartment_id, notification_topic_id, approver_group_id_list, privileged_operation_list, resource_type, resources, display_name, description, number_of_approvers, freeform_tags, defined_tags): +def create_privileged_api_control(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, compartment_id, notification_topic_id, approver_group_id_list, privileged_operation_list, resource_type, display_name, description, approver_group_level_list, resources, number_of_approvers, freeform_tags, defined_tags): kwargs = {} kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id']) @@ -142,7 +145,6 @@ def create_privileged_api_control(ctx, from_json, wait_for_state, max_wait_secon _details['approverGroupIdList'] = cli_util.parse_json_parameter("approver_group_id_list", approver_group_id_list) _details['privilegedOperationList'] = cli_util.parse_json_parameter("privileged_operation_list", privileged_operation_list) _details['resourceType'] = resource_type - _details['resources'] = cli_util.parse_json_parameter("resources", resources) if display_name is not None: _details['displayName'] = display_name @@ -150,6 +152,12 @@ def create_privileged_api_control(ctx, from_json, wait_for_state, max_wait_secon if description is not None: _details['description'] = description + if approver_group_level_list is not None: + _details['approverGroupLevelList'] = cli_util.parse_json_parameter("approver_group_level_list", approver_group_level_list) + + if resources is not None: + _details['resources'] = cli_util.parse_json_parameter("resources", resources) + if number_of_approvers is not None: _details['numberOfApprovers'] = number_of_approvers @@ -276,7 +284,7 @@ def get_privileged_api_control(ctx, from_json, privileged_api_control_id): @privileged_api_control_collection_group.command(name=cli_util.override('privileged_api_control.list_privileged_api_controls.command_name', 'list-privileged-api-controls'), help=u"""Gets a list of PrivilegedApiControls. \n[Command Reference](listPrivilegedApiControls)""") -@cli_util.option('--compartment-id', help=u"""The [OCID] of the compartment in which to list resources.""") +@cli_util.option('--compartment-id', required=True, help=u"""The [OCID] of the compartment in which to list resources.""") @cli_util.option('--id', help=u"""The [OCID] of the PrivilegedApiControl.""") @cli_util.option('--lifecycle-state', type=custom_types.CliCaseInsensitiveChoice(["CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED", "FAILED", "NEEDS_ATTENTION"]), help=u"""A filter to return only resources that match the given lifecycle state. The state value is case-insensitive.""") @cli_util.option('--display-name', help=u"""A filter to return only resources that match the given display name exactly.""") @@ -298,8 +306,6 @@ def list_privileged_api_controls(ctx, from_json, all_pages, page_size, compartme raise click.UsageError('If you provide the --all option you cannot provide the --limit option') kwargs = {} - if compartment_id is not None: - kwargs['compartment_id'] = compartment_id if id is not None: kwargs['id'] = id if lifecycle_state is not None: @@ -324,6 +330,7 @@ def list_privileged_api_controls(ctx, from_json, all_pages, page_size, compartme result = cli_util.list_call_get_all_results( client.list_privileged_api_controls, + compartment_id=compartment_id, **kwargs ) elif limit is not None: @@ -331,10 +338,12 @@ def list_privileged_api_controls(ctx, from_json, all_pages, page_size, compartme client.list_privileged_api_controls, limit, page_size, + compartment_id=compartment_id, **kwargs ) else: result = client.list_privileged_api_controls( + compartment_id=compartment_id, **kwargs ) cli_util.render_response(result, ctx) @@ -346,8 +355,11 @@ def list_privileged_api_controls(ctx, from_json, all_pages, page_size, compartme @cli_util.option('--description', help=u"""Description of the privilegedApi control.""") @cli_util.option('--resource-type', help=u"""resourceType for which the PrivilegedApiControl is applicable""") @cli_util.option('--resources', type=custom_types.CLI_COMPLEX_TYPE, help=u"""contains Resource details""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP) -@cli_util.option('--notification-topic-id', help=u"""The OCID of the OCI Notification topic to publish messages related to this Delegation Control.""") +@cli_util.option('--notification-topic-id', help=u"""The OCID of the OCI Notification topic to publish messages related to this Privileged Api Control.""") @cli_util.option('--approver-group-id-list', type=custom_types.CLI_COMPLEX_TYPE, help=u"""List of user IAM group ids who can approve an privilegedApi request associated with a target resource under the governance of this privilegedApi control.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP) +@cli_util.option('--approver-group-level-list', type=custom_types.CLI_COMPLEX_TYPE, help=u"""List of Group containing the levels at which the users belonging to the group can authorize. + +This option is a JSON list with items of type ApproverGroupLevel. For documentation on ApproverGroupLevel please see our API reference: https://docs.oracle.com/en-us/iaas/api/#/en/privilegedapicontrol/20241130/datatypes/ApproverGroupLevel.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP) @cli_util.option('--privileged-operation-list', type=custom_types.CLI_COMPLEX_TYPE, help=u"""List of privileged operator operations. If Privileged API Managment is enabled for a resource it will be validated whether the operation done by the operator is a part of privileged operation. This option is a JSON list with items of type PrivilegedApiDetails. For documentation on PrivilegedApiDetails please see our API reference: https://docs.oracle.com/en-us/iaas/api/#/en/privilegedapicontrol/20241130/datatypes/PrivilegedApiDetails.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP) @@ -363,18 +375,18 @@ def list_privileged_api_controls(ctx, from_json, all_pages, page_size, compartme @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({'resources': {'module': 'apiaccesscontrol', 'class': 'list[string]'}, 'approver-group-id-list': {'module': 'apiaccesscontrol', 'class': 'list[string]'}, 'privileged-operation-list': {'module': 'apiaccesscontrol', 'class': 'list[PrivilegedApiDetails]'}, 'freeform-tags': {'module': 'apiaccesscontrol', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'apiaccesscontrol', 'class': 'dict(str, dict(str, object))'}}) +@json_skeleton_utils.get_cli_json_input_option({'resources': {'module': 'apiaccesscontrol', 'class': 'list[string]'}, 'approver-group-id-list': {'module': 'apiaccesscontrol', 'class': 'list[string]'}, 'approver-group-level-list': {'module': 'apiaccesscontrol', 'class': 'list[ApproverGroupLevel]'}, 'privileged-operation-list': {'module': 'apiaccesscontrol', 'class': 'list[PrivilegedApiDetails]'}, 'freeform-tags': {'module': 'apiaccesscontrol', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'apiaccesscontrol', '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={'resources': {'module': 'apiaccesscontrol', 'class': 'list[string]'}, 'approver-group-id-list': {'module': 'apiaccesscontrol', 'class': 'list[string]'}, 'privileged-operation-list': {'module': 'apiaccesscontrol', 'class': 'list[PrivilegedApiDetails]'}, 'freeform-tags': {'module': 'apiaccesscontrol', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'apiaccesscontrol', 'class': 'dict(str, dict(str, object))'}}) +@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'resources': {'module': 'apiaccesscontrol', 'class': 'list[string]'}, 'approver-group-id-list': {'module': 'apiaccesscontrol', 'class': 'list[string]'}, 'approver-group-level-list': {'module': 'apiaccesscontrol', 'class': 'list[ApproverGroupLevel]'}, 'privileged-operation-list': {'module': 'apiaccesscontrol', 'class': 'list[PrivilegedApiDetails]'}, 'freeform-tags': {'module': 'apiaccesscontrol', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'apiaccesscontrol', 'class': 'dict(str, dict(str, object))'}}) @cli_util.wrap_exceptions -def update_privileged_api_control(ctx, from_json, force, wait_for_state, max_wait_seconds, wait_interval_seconds, privileged_api_control_id, display_name, description, resource_type, resources, notification_topic_id, approver_group_id_list, privileged_operation_list, number_of_approvers, freeform_tags, defined_tags, if_match): +def update_privileged_api_control(ctx, from_json, force, wait_for_state, max_wait_seconds, wait_interval_seconds, privileged_api_control_id, display_name, description, resource_type, resources, notification_topic_id, approver_group_id_list, approver_group_level_list, privileged_operation_list, number_of_approvers, freeform_tags, defined_tags, if_match): if isinstance(privileged_api_control_id, six.string_types) and len(privileged_api_control_id.strip()) == 0: raise click.UsageError('Parameter --privileged-api-control-id cannot be whitespace or empty string') if not force: - if resources or approver_group_id_list or privileged_operation_list or freeform_tags or defined_tags: - if not click.confirm("WARNING: Updates to resources and approver-group-id-list and privileged-operation-list and freeform-tags and defined-tags will replace any existing values. Are you sure you want to continue?"): + if resources or approver_group_id_list or approver_group_level_list or privileged_operation_list or freeform_tags or defined_tags: + if not click.confirm("WARNING: Updates to resources and approver-group-id-list and approver-group-level-list and privileged-operation-list and freeform-tags and defined-tags will replace any existing values. Are you sure you want to continue?"): ctx.abort() kwargs = {} @@ -402,6 +414,9 @@ def update_privileged_api_control(ctx, from_json, force, wait_for_state, max_wai if approver_group_id_list is not None: _details['approverGroupIdList'] = cli_util.parse_json_parameter("approver_group_id_list", approver_group_id_list) + if approver_group_level_list is not None: + _details['approverGroupLevelList'] = cli_util.parse_json_parameter("approver_group_level_list", approver_group_level_list) + if privileged_operation_list is not None: _details['privilegedOperationList'] = cli_util.parse_json_parameter("privileged_operation_list", privileged_operation_list) diff --git a/services/apiaccesscontrol/src/oci_cli_privileged_api_requests/generated/privilegedapirequests_cli.py b/services/apiaccesscontrol/src/oci_cli_privileged_api_requests/generated/privilegedapirequests_cli.py index b00641582..1dd504dde 100644 --- a/services/apiaccesscontrol/src/oci_cli_privileged_api_requests/generated/privilegedapirequests_cli.py +++ b/services/apiaccesscontrol/src/oci_cli_privileged_api_requests/generated/privilegedapirequests_cli.py @@ -178,9 +178,9 @@ def close_privileged_api_request(ctx, from_json, wait_for_state, max_wait_second @privileged_api_request_group.command(name=cli_util.override('privileged_api_requests.create_privileged_api_request.command_name', 'create'), help=u"""Creates a PrivilegedApiRequest. \n[Command Reference](createPrivilegedApiRequest)""") @cli_util.option('--reason-summary', required=True, help=u"""Summary comment by the operator creating the access request.""") +@cli_util.option('--compartment-id', required=True, help=u"""The [OCID] of the compartment.""") @cli_util.option('--resource-id', required=True, help=u"""The OCID of the target resource associated with the access request. The operator raises an access request to get approval to access the target resource.""") @cli_util.option('--privileged-operation-list', required=True, type=custom_types.CLI_COMPLEX_TYPE, help=u"""List of api names, attributes for which approval is sought by the user.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP) -@cli_util.option('--compartment-id', help=u"""The [OCID] of the compartment.""") @cli_util.option('--sub-resource-name-list', type=custom_types.CLI_COMPLEX_TYPE, help=u"""The subresource names requested for approval.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP) @cli_util.option('--notification-topic-id', help=u"""The OCID of the OCI Notification topic to publish messages related to this Privileged Api Request.""") @cli_util.option('--reason-detail', help=u"""Reason in detail for which the operator is requesting access on the target resource.""") @@ -202,19 +202,17 @@ def close_privileged_api_request(ctx, from_json, wait_for_state, max_wait_second @click.pass_context @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'sub-resource-name-list': {'module': 'apiaccesscontrol', 'class': 'list[string]'}, 'privileged-operation-list': {'module': 'apiaccesscontrol', 'class': 'list[PrivilegedApiRequestOperationDetails]'}, 'ticket-numbers': {'module': 'apiaccesscontrol', 'class': 'list[string]'}, 'freeform-tags': {'module': 'apiaccesscontrol', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'apiaccesscontrol', 'class': 'dict(str, dict(str, object))'}}, output_type={'module': 'apiaccesscontrol', 'class': 'PrivilegedApiRequest'}) @cli_util.wrap_exceptions -def create_privileged_api_request(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, reason_summary, resource_id, privileged_operation_list, compartment_id, sub_resource_name_list, notification_topic_id, reason_detail, severity, duration_in_hrs, ticket_numbers, time_requested_for_future_access, freeform_tags, defined_tags): +def create_privileged_api_request(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, reason_summary, compartment_id, resource_id, privileged_operation_list, sub_resource_name_list, notification_topic_id, reason_detail, severity, duration_in_hrs, ticket_numbers, time_requested_for_future_access, freeform_tags, defined_tags): kwargs = {} kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id']) _details = {} _details['reasonSummary'] = reason_summary + _details['compartmentId'] = compartment_id _details['resourceId'] = resource_id _details['privilegedOperationList'] = cli_util.parse_json_parameter("privileged_operation_list", privileged_operation_list) - if compartment_id is not None: - _details['compartmentId'] = compartment_id - if sub_resource_name_list is not None: _details['subResourceNameList'] = cli_util.parse_json_parameter("sub_resource_name_list", sub_resource_name_list) @@ -300,7 +298,7 @@ def get_privileged_api_request(ctx, from_json, privileged_api_request_id): @privileged_api_request_collection_group.command(name=cli_util.override('privileged_api_requests.list_privileged_api_requests.command_name', 'list-privileged-api-requests'), help=u"""Lists all privilegedApi requests in the compartment. \n[Command Reference](listPrivilegedApiRequests)""") -@cli_util.option('--compartment-id', help=u"""The [OCID] of the compartment in which to list resources.""") +@cli_util.option('--compartment-id', required=True, help=u"""The [OCID] of the compartment in which to list resources.""") @cli_util.option('--id', help=u"""The [OCID] of the PrivilegedApiRequest.""") @cli_util.option('--display-name', help=u"""A filter to return only resources that match the given display name exactly.""") @cli_util.option('--resource-id', help=u"""The [OCID] of the resource .""") @@ -324,8 +322,6 @@ def list_privileged_api_requests(ctx, from_json, all_pages, page_size, compartme raise click.UsageError('If you provide the --all option you cannot provide the --limit option') kwargs = {} - if compartment_id is not None: - kwargs['compartment_id'] = compartment_id if id is not None: kwargs['id'] = id if display_name is not None: @@ -354,6 +350,7 @@ def list_privileged_api_requests(ctx, from_json, all_pages, page_size, compartme result = cli_util.list_call_get_all_results( client.list_privileged_api_requests, + compartment_id=compartment_id, **kwargs ) elif limit is not None: @@ -361,10 +358,12 @@ def list_privileged_api_requests(ctx, from_json, all_pages, page_size, compartme client.list_privileged_api_requests, limit, page_size, + compartment_id=compartment_id, **kwargs ) else: result = client.list_privileged_api_requests( + compartment_id=compartment_id, **kwargs ) cli_util.render_response(result, ctx) diff --git a/services/apiaccesscontrol/src/oci_cli_privileged_api_work_request/generated/privilegedapiworkrequest_cli.py b/services/apiaccesscontrol/src/oci_cli_privileged_api_work_request/generated/privilegedapiworkrequest_cli.py index 259cdfe7b..b80560955 100644 --- a/services/apiaccesscontrol/src/oci_cli_privileged_api_work_request/generated/privilegedapiworkrequest_cli.py +++ b/services/apiaccesscontrol/src/oci_cli_privileged_api_work_request/generated/privilegedapiworkrequest_cli.py @@ -214,7 +214,7 @@ def list_work_request_logs(ctx, from_json, all_pages, page_size, work_request_id @work_request_group.command(name=cli_util.override('privileged_api_work_request.list_work_requests.command_name', 'list'), help=u"""Lists the work requests in a compartment. \n[Command Reference](listWorkRequests)""") -@cli_util.option('--compartment-id', help=u"""The [OCID] of the compartment in which to list resources.""") +@cli_util.option('--compartment-id', required=True, help=u"""The [OCID] of the compartment in which to list resources.""") @cli_util.option('--work-request-id', help=u"""The [OCID] of the asynchronous work request.""") @cli_util.option('--status', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "WAITING", "NEEDS_ATTENTION", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED"]), help=u"""A filter to return only the resources that match the given lifecycle state.""") @cli_util.option('--resource-id', help=u"""The [OCID] of the resource affected by the work request.""") @@ -235,8 +235,6 @@ def list_work_requests(ctx, from_json, all_pages, page_size, compartment_id, wor raise click.UsageError('If you provide the --all option you cannot provide the --limit option') kwargs = {} - if compartment_id is not None: - kwargs['compartment_id'] = compartment_id if work_request_id is not None: kwargs['work_request_id'] = work_request_id if status is not None: @@ -259,6 +257,7 @@ def list_work_requests(ctx, from_json, all_pages, page_size, compartment_id, wor result = cli_util.list_call_get_all_results( client.list_work_requests, + compartment_id=compartment_id, **kwargs ) elif limit is not None: @@ -266,10 +265,12 @@ def list_work_requests(ctx, from_json, all_pages, page_size, compartment_id, wor 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) diff --git a/services/core/src/oci_cli_blockstorage/generated/blockstorage_cli.py b/services/core/src/oci_cli_blockstorage/generated/blockstorage_cli.py index 0edafc58b..9a12ce6e8 100644 --- a/services/core/src/oci_cli_blockstorage/generated/blockstorage_cli.py +++ b/services/core/src/oci_cli_blockstorage/generated/blockstorage_cli.py @@ -1161,15 +1161,19 @@ def create_boot_volume_boot_volume_source_from_boot_volume_backup_delta_details( Example: `{\"Department\": \"Finance\"}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP) @cli_util.option('--type', type=custom_types.CliCaseInsensitiveChoice(["FULL", "INCREMENTAL"]), help=u"""The type of backup to create. If omitted, defaults to incremental.""") @cli_util.option('--kms-key-id', help=u"""The OCID of the Vault service key which is the master encryption key for the volume backup. For more information about the Vault service and encryption keys, see [Overview of Vault service] and [Using Keys].""") +@cli_util.option('--retention-period', type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP) +@cli_util.option('--is-prevent-deletion-enabled', type=click.BOOL, help=u"""Prevent backups from being deleted during the configured retention period. This is an optional field. If it is not specified, it is set to null, prevent deletion will not be applied to the backups.""") +@cli_util.option('--is-retention-lock-enabled', type=click.BOOL, help=u"""feature that prevents deletion or alteration of backup data for a specified period to ensure data protection and regulatory compliance. This is an optional field. If it is not specified, it is set to null, no retention lock will be applied to the backups. This feature should be used in conjunction with the retention-period field.""") +@cli_util.option('--is-indefinite-retention-enabled', type=click.BOOL, help=u"""feature that preserves backup data from modification or deletion to ensure it remains available for legal or regulatory investigations or litigation, regardless of standard retention policies. This is an optional field. If it is not specified, it is set to null, no legal hold will be applied to the backups.""") @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["CREATING", "AVAILABLE", "TERMINATING", "TERMINATED", "FAULTY", "REQUEST_RECEIVED"]), 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 REQUEST_RECEIVED 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)'}, 'retention-period': {'module': 'core', 'class': 'RetentionDuration'}}) @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': 'BootVolumeBackup'}) +@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)'}, 'retention-period': {'module': 'core', 'class': 'RetentionDuration'}}, output_type={'module': 'core', 'class': 'BootVolumeBackup'}) @cli_util.wrap_exceptions -def create_boot_volume_backup(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, boot_volume_id, defined_tags, display_name, freeform_tags, type, kms_key_id): +def create_boot_volume_backup(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, boot_volume_id, defined_tags, display_name, freeform_tags, type, kms_key_id, retention_period, is_prevent_deletion_enabled, is_retention_lock_enabled, is_indefinite_retention_enabled): kwargs = {} @@ -1191,6 +1195,18 @@ def create_boot_volume_backup(ctx, from_json, wait_for_state, max_wait_seconds, if kms_key_id is not None: _details['kmsKeyId'] = kms_key_id + if retention_period is not None: + _details['retentionPeriod'] = cli_util.parse_json_parameter("retention_period", retention_period) + + if is_prevent_deletion_enabled is not None: + _details['isPreventDeletionEnabled'] = is_prevent_deletion_enabled + + if is_retention_lock_enabled is not None: + _details['isRetentionLockEnabled'] = is_retention_lock_enabled + + if is_indefinite_retention_enabled is not None: + _details['isIndefiniteRetentionEnabled'] = is_indefinite_retention_enabled + client = cli_util.build_client('core', 'blockstorage', ctx) result = client.create_boot_volume_backup( create_boot_volume_backup_details=_details, @@ -1955,15 +1971,19 @@ def create_volume_volume_source_from_volume_backup_delta_details(ctx, from_json, Example: `{\"Department\": \"Finance\"}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP) @cli_util.option('--type', type=custom_types.CliCaseInsensitiveChoice(["FULL", "INCREMENTAL"]), help=u"""The type of backup to create. If omitted, defaults to INCREMENTAL.""") +@cli_util.option('--retention-period', type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP) +@cli_util.option('--is-prevent-deletion-enabled', type=click.BOOL, help=u"""Prevent backups from being deleted during the configured retention period. This is an optional field. If it is not specified, it is set to null, prevent deletion will not be applied to the backups.""") +@cli_util.option('--is-retention-lock-enabled', type=click.BOOL, help=u"""feature that prevents deletion or alteration of backup data for a specified period to ensure data protection and regulatory compliance. This is an optional field. If it is not specified, it is set to null, no retention lock will be applied to the backups. This feature should be used in conjunction with the retention-period field.""") +@cli_util.option('--is-indefinite-retention-enabled', type=click.BOOL, help=u"""feature that preserves backup data from modification or deletion to ensure it remains available for legal or regulatory investigations or litigation, regardless of standard retention policies. This is an optional field. If it is not specified, it is set to null, no legal hold will be applied to the backups.""") @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["CREATING", "AVAILABLE", "TERMINATING", "TERMINATED", "FAULTY", "REQUEST_RECEIVED"]), 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 REQUEST_RECEIVED 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)'}, 'retention-period': {'module': 'core', 'class': 'RetentionDuration'}}) @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': 'VolumeBackup'}) +@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)'}, 'retention-period': {'module': 'core', 'class': 'RetentionDuration'}}, output_type={'module': 'core', 'class': 'VolumeBackup'}) @cli_util.wrap_exceptions -def create_volume_backup(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, volume_id, kms_key_id, defined_tags, display_name, freeform_tags, type): +def create_volume_backup(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, volume_id, kms_key_id, defined_tags, display_name, freeform_tags, type, retention_period, is_prevent_deletion_enabled, is_retention_lock_enabled, is_indefinite_retention_enabled): kwargs = {} @@ -1985,6 +2005,18 @@ def create_volume_backup(ctx, from_json, wait_for_state, max_wait_seconds, wait_ if type is not None: _details['type'] = type + if retention_period is not None: + _details['retentionPeriod'] = cli_util.parse_json_parameter("retention_period", retention_period) + + if is_prevent_deletion_enabled is not None: + _details['isPreventDeletionEnabled'] = is_prevent_deletion_enabled + + if is_retention_lock_enabled is not None: + _details['isRetentionLockEnabled'] = is_retention_lock_enabled + + if is_indefinite_retention_enabled is not None: + _details['isIndefiniteRetentionEnabled'] = is_indefinite_retention_enabled + client = cli_util.build_client('core', 'blockstorage', ctx) result = client.create_volume_backup( create_volume_backup_details=_details, @@ -2558,15 +2590,19 @@ def create_volume_group_volume_group_source_from_volume_group_backup_details(ctx Example: `{\"Department\": \"Finance\"}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP) @cli_util.option('--type', type=custom_types.CliCaseInsensitiveChoice(["FULL", "INCREMENTAL"]), help=u"""The type of backup to create. If omitted, defaults to incremental.""") +@cli_util.option('--retention-period', type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP) +@cli_util.option('--is-prevent-deletion-enabled', type=click.BOOL, help=u"""Prevent backups from being deleted during the configured retention period. This is an optional field. If it is not specified, it is set to null, prevent deletion will not be applied to the backups.""") +@cli_util.option('--is-retention-lock-enabled', type=click.BOOL, help=u"""feature that prevents deletion or alteration of backup data for a specified period to ensure data protection and regulatory compliance. This is an optional field. If it is not specified, it is set to null, no retention lock will be applied to the backups. This feature should be used in conjunction with the retention-period field.""") +@cli_util.option('--is-indefinite-retention-enabled', type=click.BOOL, help=u"""feature that preserves backup data from modification or deletion to ensure it remains available for legal or regulatory investigations or litigation, regardless of standard retention policies. This is an optional field. If it is not specified, it is set to null, no legal hold will be applied to the backups.""") @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["CREATING", "COMMITTED", "AVAILABLE", "TERMINATING", "TERMINATED", "FAULTY", "REQUEST_RECEIVED"]), 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 REQUEST_RECEIVED 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)'}, 'retention-period': {'module': 'core', 'class': 'RetentionDuration'}}) @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': 'VolumeGroupBackup'}) +@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)'}, 'retention-period': {'module': 'core', 'class': 'RetentionDuration'}}, output_type={'module': 'core', 'class': 'VolumeGroupBackup'}) @cli_util.wrap_exceptions -def create_volume_group_backup(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, volume_group_id, compartment_id, defined_tags, display_name, freeform_tags, type): +def create_volume_group_backup(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, volume_group_id, compartment_id, defined_tags, display_name, freeform_tags, type, retention_period, is_prevent_deletion_enabled, is_retention_lock_enabled, is_indefinite_retention_enabled): kwargs = {} @@ -2588,6 +2624,18 @@ def create_volume_group_backup(ctx, from_json, wait_for_state, max_wait_seconds, if type is not None: _details['type'] = type + if retention_period is not None: + _details['retentionPeriod'] = cli_util.parse_json_parameter("retention_period", retention_period) + + if is_prevent_deletion_enabled is not None: + _details['isPreventDeletionEnabled'] = is_prevent_deletion_enabled + + if is_retention_lock_enabled is not None: + _details['isRetentionLockEnabled'] = is_retention_lock_enabled + + if is_indefinite_retention_enabled is not None: + _details['isIndefiniteRetentionEnabled'] = is_indefinite_retention_enabled + client = cli_util.build_client('core', 'blockstorage', ctx) result = client.create_volume_group_backup( create_volume_group_backup_details=_details, @@ -4191,23 +4239,27 @@ def update_boot_volume(ctx, from_json, force, wait_for_state, max_wait_seconds, Example: `{\"Department\": \"Finance\"}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP) @cli_util.option('--kms-key-id', help=u"""The OCID of the Vault service key which is the master encryption key for the volume backup. For more information about the Vault service and encryption keys, see [Overview of Vault service] and [Using Keys].""") +@cli_util.option('--retention-period', type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP) +@cli_util.option('--is-prevent-deletion-enabled', type=click.BOOL, help=u"""Prevent backups from being deleted during the configured retention period. This is an optional field. If it is not specified, it is set to null, prevent deletion will not be applied to the backups.""") +@cli_util.option('--is-retention-lock-enabled', type=click.BOOL, help=u"""feature that prevents deletion or alteration of backup data for a specified period to ensure data protection and regulatory compliance. This is an optional field. If it is not specified, it is set to null, no retention lock will be applied to the backups. This feature should be used in conjunction with the retention-period field.""") +@cli_util.option('--is-indefinite-retention-enabled', type=click.BOOL, help=u"""feature that preserves backup data from modification or deletion to ensure it remains available for legal or regulatory investigations or litigation, regardless of standard retention policies. This is an optional field. If it is not specified, it is set to null, no legal hold will be applied to the backups.""") @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(["CREATING", "AVAILABLE", "TERMINATING", "TERMINATED", "FAULTY", "REQUEST_RECEIVED"]), 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 REQUEST_RECEIVED 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)'}, 'retention-period': {'module': 'core', 'class': 'RetentionDuration'}}) @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': 'BootVolumeBackup'}) +@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)'}, 'retention-period': {'module': 'core', 'class': 'RetentionDuration'}}, output_type={'module': 'core', 'class': 'BootVolumeBackup'}) @cli_util.wrap_exceptions -def update_boot_volume_backup(ctx, from_json, force, wait_for_state, max_wait_seconds, wait_interval_seconds, boot_volume_backup_id, defined_tags, display_name, freeform_tags, kms_key_id, if_match): +def update_boot_volume_backup(ctx, from_json, force, wait_for_state, max_wait_seconds, wait_interval_seconds, boot_volume_backup_id, defined_tags, display_name, freeform_tags, kms_key_id, retention_period, is_prevent_deletion_enabled, is_retention_lock_enabled, is_indefinite_retention_enabled, if_match): if isinstance(boot_volume_backup_id, six.string_types) and len(boot_volume_backup_id.strip()) == 0: raise click.UsageError('Parameter --boot-volume-backup-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?"): + if defined_tags or freeform_tags or retention_period: + if not click.confirm("WARNING: Updates to defined-tags and freeform-tags and retention-period will replace any existing values. Are you sure you want to continue?"): ctx.abort() kwargs = {} @@ -4228,6 +4280,18 @@ def update_boot_volume_backup(ctx, from_json, force, wait_for_state, max_wait_se if kms_key_id is not None: _details['kmsKeyId'] = kms_key_id + if retention_period is not None: + _details['retentionPeriod'] = cli_util.parse_json_parameter("retention_period", retention_period) + + if is_prevent_deletion_enabled is not None: + _details['isPreventDeletionEnabled'] = is_prevent_deletion_enabled + + if is_retention_lock_enabled is not None: + _details['isRetentionLockEnabled'] = is_retention_lock_enabled + + if is_indefinite_retention_enabled is not None: + _details['isIndefiniteRetentionEnabled'] = is_indefinite_retention_enabled + client = cli_util.build_client('core', 'blockstorage', ctx) result = client.update_boot_volume_backup( boot_volume_backup_id=boot_volume_backup_id, @@ -4417,23 +4481,27 @@ def update_volume(ctx, from_json, force, wait_for_state, max_wait_seconds, wait_ Example: `{\"Department\": \"Finance\"}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP) @cli_util.option('--kms-key-id', help=u"""The OCID of the Vault service key which is the master encryption key for the volume backup. For more information about the Vault service and encryption keys, see [Overview of Vault service] and [Using Keys].""") +@cli_util.option('--retention-period', type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP) +@cli_util.option('--is-prevent-deletion-enabled', type=click.BOOL, help=u"""Prevent backups from being deleted during the configured retention period. This is an optional field. If it is not specified, it is set to null, prevent deletion will not be applied to the backups.""") +@cli_util.option('--is-retention-lock-enabled', type=click.BOOL, help=u"""feature that prevents deletion or alteration of backup data for a specified period to ensure data protection and regulatory compliance. This is an optional field. If it is not specified, it is set to null, no retention lock will be applied to the backups. This feature should be used in conjunction with the retention-period field.""") +@cli_util.option('--is-indefinite-retention-enabled', type=click.BOOL, help=u"""feature that preserves backup data from modification or deletion to ensure it remains available for legal or regulatory investigations or litigation, regardless of standard retention policies. This is an optional field. If it is not specified, it is set to null, no legal hold will be applied to the backups.""") @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(["CREATING", "AVAILABLE", "TERMINATING", "TERMINATED", "FAULTY", "REQUEST_RECEIVED"]), 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 REQUEST_RECEIVED 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)'}, 'retention-period': {'module': 'core', 'class': 'RetentionDuration'}}) @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': 'VolumeBackup'}) +@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)'}, 'retention-period': {'module': 'core', 'class': 'RetentionDuration'}}, output_type={'module': 'core', 'class': 'VolumeBackup'}) @cli_util.wrap_exceptions -def update_volume_backup(ctx, from_json, force, wait_for_state, max_wait_seconds, wait_interval_seconds, volume_backup_id, defined_tags, display_name, freeform_tags, kms_key_id, if_match): +def update_volume_backup(ctx, from_json, force, wait_for_state, max_wait_seconds, wait_interval_seconds, volume_backup_id, defined_tags, display_name, freeform_tags, kms_key_id, retention_period, is_prevent_deletion_enabled, is_retention_lock_enabled, is_indefinite_retention_enabled, if_match): if isinstance(volume_backup_id, six.string_types) and len(volume_backup_id.strip()) == 0: raise click.UsageError('Parameter --volume-backup-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?"): + if defined_tags or freeform_tags or retention_period: + if not click.confirm("WARNING: Updates to defined-tags and freeform-tags and retention-period will replace any existing values. Are you sure you want to continue?"): ctx.abort() kwargs = {} @@ -4454,6 +4522,18 @@ def update_volume_backup(ctx, from_json, force, wait_for_state, max_wait_seconds if kms_key_id is not None: _details['kmsKeyId'] = kms_key_id + if retention_period is not None: + _details['retentionPeriod'] = cli_util.parse_json_parameter("retention_period", retention_period) + + if is_prevent_deletion_enabled is not None: + _details['isPreventDeletionEnabled'] = is_prevent_deletion_enabled + + if is_retention_lock_enabled is not None: + _details['isRetentionLockEnabled'] = is_retention_lock_enabled + + if is_indefinite_retention_enabled is not None: + _details['isIndefiniteRetentionEnabled'] = is_indefinite_retention_enabled + client = cli_util.build_client('core', 'blockstorage', ctx) result = client.update_volume_backup( volume_backup_id=volume_backup_id, @@ -4647,23 +4727,27 @@ def update_volume_group(ctx, from_json, force, wait_for_state, max_wait_seconds, @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('--retention-period', type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP) +@cli_util.option('--is-prevent-deletion-enabled', type=click.BOOL, help=u"""Prevent backups from being deleted during the configured retention period. This is an optional field. If it is not specified, it is set to null, prevent deletion will not be applied to the backups.""") +@cli_util.option('--is-retention-lock-enabled', type=click.BOOL, help=u"""feature that prevents deletion or alteration of backup data for a specified period to ensure data protection and regulatory compliance. This is an optional field. If it is not specified, it is set to null, no retention lock will be applied to the backups. This feature should be used in conjunction with the retention-period field.""") +@cli_util.option('--is-indefinite-retention-enabled', type=click.BOOL, help=u"""feature that preserves backup data from modification or deletion to ensure it remains available for legal or regulatory investigations or litigation, regardless of standard retention policies. This is an optional field. If it is not specified, it is set to null, no legal hold will be applied to the backups.""") @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(["CREATING", "COMMITTED", "AVAILABLE", "TERMINATING", "TERMINATED", "FAULTY", "REQUEST_RECEIVED"]), 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 REQUEST_RECEIVED 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)'}, 'retention-period': {'module': 'core', 'class': 'RetentionDuration'}}) @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': 'VolumeGroupBackup'}) +@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)'}, 'retention-period': {'module': 'core', 'class': 'RetentionDuration'}}, output_type={'module': 'core', 'class': 'VolumeGroupBackup'}) @cli_util.wrap_exceptions -def update_volume_group_backup(ctx, from_json, force, wait_for_state, max_wait_seconds, wait_interval_seconds, volume_group_backup_id, defined_tags, display_name, freeform_tags, if_match): +def update_volume_group_backup(ctx, from_json, force, wait_for_state, max_wait_seconds, wait_interval_seconds, volume_group_backup_id, defined_tags, display_name, freeform_tags, retention_period, is_prevent_deletion_enabled, is_retention_lock_enabled, is_indefinite_retention_enabled, if_match): if isinstance(volume_group_backup_id, six.string_types) and len(volume_group_backup_id.strip()) == 0: raise click.UsageError('Parameter --volume-group-backup-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?"): + if defined_tags or freeform_tags or retention_period: + if not click.confirm("WARNING: Updates to defined-tags and freeform-tags and retention-period will replace any existing values. Are you sure you want to continue?"): ctx.abort() kwargs = {} @@ -4681,6 +4765,18 @@ def update_volume_group_backup(ctx, from_json, force, wait_for_state, max_wait_s if freeform_tags is not None: _details['freeformTags'] = cli_util.parse_json_parameter("freeform_tags", freeform_tags) + if retention_period is not None: + _details['retentionPeriod'] = cli_util.parse_json_parameter("retention_period", retention_period) + + if is_prevent_deletion_enabled is not None: + _details['isPreventDeletionEnabled'] = is_prevent_deletion_enabled + + if is_retention_lock_enabled is not None: + _details['isRetentionLockEnabled'] = is_retention_lock_enabled + + if is_indefinite_retention_enabled is not None: + _details['isIndefiniteRetentionEnabled'] = is_indefinite_retention_enabled + client = cli_util.build_client('core', 'blockstorage', ctx) result = client.update_volume_group_backup( volume_group_backup_id=volume_group_backup_id, 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 08cb551a0..812c17de5 100644 --- a/services/core/src/oci_cli_compute/generated/compute_cli.py +++ b/services/core/src/oci_cli_compute/generated/compute_cli.py @@ -2598,6 +2598,7 @@ def create_compute_image_capability_schema(ctx, from_json, wait_for_state, max_w @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('--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('--is-burstable', type=click.BOOL, help=u"""Specifies if the Dedicated Virtual Machine Host (DVMH) is restricted to running only Burstable VMs. If `true`, only Burstable VMs can be launched. If `false`, Burstable 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.""") @@ -2606,7 +2607,7 @@ def create_compute_image_capability_schema(ctx, from_json, wait_for_state, max_w @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': 'DedicatedVmHost'}) @cli_util.wrap_exceptions -def create_dedicated_vm_host(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, placement_constraint_details, capacity_config, is_memory_encryption_enabled): +def create_dedicated_vm_host(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, placement_constraint_details, capacity_config, is_memory_encryption_enabled, is_burstable): kwargs = {} kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id']) @@ -2637,6 +2638,9 @@ def create_dedicated_vm_host(ctx, from_json, wait_for_state, max_wait_seconds, w if is_memory_encryption_enabled is not None: _details['isMemoryEncryptionEnabled'] = is_memory_encryption_enabled + if is_burstable is not None: + _details['isBurstable'] = is_burstable + client = cli_util.build_client('core', 'compute', ctx) result = client.create_dedicated_vm_host( create_dedicated_vm_host_details=_details, @@ -2689,6 +2693,7 @@ def create_dedicated_vm_host(ctx, from_json, wait_for_state, max_wait_seconds, w 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('--is-burstable', type=click.BOOL, help=u"""Specifies if the Dedicated Virtual Machine Host (DVMH) is restricted to running only Burstable VMs. If `true`, only Burstable VMs can be launched. If `false`, Burstable 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.""") @@ -2697,7 +2702,7 @@ def create_dedicated_vm_host(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={'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_host_group_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_host_group_id, defined_tags, display_name, fault_domain, freeform_tags, capacity_config, is_memory_encryption_enabled): +def create_dedicated_vm_host_host_group_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_host_group_id, defined_tags, display_name, fault_domain, freeform_tags, capacity_config, is_memory_encryption_enabled, is_burstable): kwargs = {} kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id']) @@ -2727,6 +2732,9 @@ def create_dedicated_vm_host_host_group_placement_constraint_details(ctx, from_j if is_memory_encryption_enabled is not None: _details['isMemoryEncryptionEnabled'] = is_memory_encryption_enabled + if is_burstable is not None: + _details['isBurstable'] = is_burstable + _details['placementConstraintDetails']['type'] = 'HOST_GROUP' client = cli_util.build_client('core', 'compute', ctx) @@ -2780,6 +2788,7 @@ 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('--is-burstable', type=click.BOOL, help=u"""Specifies if the Dedicated Virtual Machine Host (DVMH) is restricted to running only Burstable VMs. If `true`, only Burstable VMs can be launched. If `false`, Burstable 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.""") @@ -2802,7 +2811,7 @@ def create_dedicated_vm_host_host_group_placement_constraint_details(ctx, from_j @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': 'DedicatedVmHost'}) @cli_util.wrap_exceptions -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): +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, is_burstable, 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']) @@ -2831,6 +2840,9 @@ def create_dedicated_vm_host_compute_cluster_placement_constraint_details(ctx, f if is_memory_encryption_enabled is not None: _details['isMemoryEncryptionEnabled'] = is_memory_encryption_enabled + if is_burstable is not None: + _details['isBurstable'] = is_burstable + if placement_constraint_details_hpc_island_id is not None: _details['placementConstraintDetails']['hpcIslandId'] = placement_constraint_details_hpc_island_id @@ -2897,6 +2909,7 @@ def create_dedicated_vm_host_compute_cluster_placement_constraint_details(ctx, f 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('--is-burstable', type=click.BOOL, help=u"""Specifies if the Dedicated Virtual Machine Host (DVMH) is restricted to running only Burstable VMs. If `true`, only Burstable VMs can be launched. If `false`, Burstable 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.""") @@ -2905,7 +2918,7 @@ def create_dedicated_vm_host_compute_cluster_placement_constraint_details(ctx, f @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): +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, is_burstable): kwargs = {} kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id']) @@ -2935,6 +2948,9 @@ 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 + if is_burstable is not None: + _details['isBurstable'] = is_burstable + _details['placementConstraintDetails']['type'] = 'COMPUTE_BARE_METAL_HOST' client = cli_util.build_client('core', 'compute', ctx) diff --git a/services/core/src/oci_cli_virtual_network/generated/virtualnetwork_cli.py b/services/core/src/oci_cli_virtual_network/generated/virtualnetwork_cli.py index fdafa1194..b48b534ae 100644 --- a/services/core/src/oci_cli_virtual_network/generated/virtualnetwork_cli.py +++ b/services/core/src/oci_cli_virtual_network/generated/virtualnetwork_cli.py @@ -206,6 +206,12 @@ def drg_route_table_group(): pass +@click.command(cli_util.override('virtual_network.provider_remote_region_name_group.command_name', 'provider-remote-region-name'), cls=CommandGroupWithAlias, help="""A pair of OCI region and Provider remote region names for FastConnect MultiCloud interconnect.""") +@cli_util.help_option_group +def provider_remote_region_name_group(): + pass + + @click.command(cli_util.override('virtual_network.tunnel_security_association_group.command_name', 'tunnel-security-association'), cls=CommandGroupWithAlias, help="""A summary of the IPSec tunnel security association details.""") @cli_util.help_option_group def tunnel_security_association_group(): @@ -591,6 +597,7 @@ def internal_public_ip_group(): virtual_network_root_group.add_command(drg_route_distribution_statement_group) virtual_network_root_group.add_command(ip_inventory_subnet_resource_collection_group) virtual_network_root_group.add_command(drg_route_table_group) +virtual_network_root_group.add_command(provider_remote_region_name_group) virtual_network_root_group.add_command(tunnel_security_association_group) virtual_network_root_group.add_command(internet_gateway_group) virtual_network_root_group.add_command(ip_sec_connection_group) @@ -5078,6 +5085,8 @@ def create_vcn(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_s This option is a JSON list with items of type CreateVirtualCircuitPublicPrefixDetails. For documentation on CreateVirtualCircuitPublicPrefixDetails please see our API reference: https://docs.oracle.com/en-us/iaas/api/#/en/iaas/20160918/datatypes/CreateVirtualCircuitPublicPrefixDetails.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP) @cli_util.option('--region-parameterconflict', help=u"""The Oracle Cloud Infrastructure region where this virtual circuit is located. Example: `phx`""") @cli_util.option('--ip-mtu', type=custom_types.CliCaseInsensitiveChoice(["MTU_1500", "MTU_9000"]), help=u"""The layer 3 IP MTU to use with this virtual circuit.""") +@cli_util.option('--provider-remote-region', help=u"""The OCI's FastConnect MultiCloud Provider/Partner remote region name associated with the OCI region. To get the list of associated provider remote region use the ListProviderRemoteRegions operation""") +@cli_util.option('--remote-account-id', help=u"""Customer's account on Provider/Partner cloud (AWS, GCP or any other)""") @cli_util.option('--traffic-mode', type=custom_types.CliCaseInsensitiveChoice(["NORMAL", "DRAIN"]), help=u"""The traffic mode to be set with this Virtual Circuit. This controls whether the traffic is to be drained for the associated Virtual Circuit or not.""") @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["PENDING_PROVIDER", "VERIFYING", "PROVISIONING", "PROVISIONED", "FAILED", "INACTIVE", "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 PENDING_PROVIDER --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.""") @@ -5087,7 +5096,7 @@ def create_vcn(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_s @click.pass_context @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'cross-connect-mappings': {'module': 'core', 'class': 'list[CrossConnectMapping]'}, 'defined-tags': {'module': 'core', 'class': 'dict(str, dict(str, object))'}, 'freeform-tags': {'module': 'core', 'class': 'dict(str, string)'}, 'public-prefixes': {'module': 'core', 'class': 'list[CreateVirtualCircuitPublicPrefixDetails]'}}, output_type={'module': 'core', 'class': 'VirtualCircuit'}) @cli_util.wrap_exceptions -def create_virtual_circuit(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, compartment_id, type, bandwidth_shape_name, cross_connect_mappings, routing_policy, bgp_admin_state, is_bfd_enabled, is_transport_mode, customer_bgp_asn, customer_asn, defined_tags, display_name, freeform_tags, gateway_id, provider_name, provider_service_id, provider_service_key_name, provider_service_name, public_prefixes, region_parameterconflict, ip_mtu, traffic_mode): +def create_virtual_circuit(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, compartment_id, type, bandwidth_shape_name, cross_connect_mappings, routing_policy, bgp_admin_state, is_bfd_enabled, is_transport_mode, customer_bgp_asn, customer_asn, defined_tags, display_name, freeform_tags, gateway_id, provider_name, provider_service_id, provider_service_key_name, provider_service_name, public_prefixes, region_parameterconflict, ip_mtu, provider_remote_region, remote_account_id, traffic_mode): kwargs = {} @@ -5152,6 +5161,12 @@ def create_virtual_circuit(ctx, from_json, wait_for_state, max_wait_seconds, wai if ip_mtu is not None: _details['ipMtu'] = ip_mtu + if provider_remote_region is not None: + _details['providerRemoteRegion'] = provider_remote_region + + if remote_account_id is not None: + _details['remoteAccountId'] = remote_account_id + if traffic_mode is not None: _details['trafficMode'] = traffic_mode @@ -10707,6 +10722,59 @@ def list_private_ips(ctx, from_json, all_pages, page_size, limit, page, ip_addre cli_util.render_response(result, ctx) +@provider_remote_region_name_group.command(name=cli_util.override('virtual_network.list_provider_remote_regions.command_name', 'list-provider-remote-regions'), help=u"""The operation lists available OCI's FastConnect MultiCloud Provider/Partner remote region names associated with an OCI region. \n[Command Reference](listProviderRemoteRegions)""") +@cli_util.option('--provider-service-id', required=True, help=u"""The [OCID] of the provider service.""") +@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]. + +Example: `50`""") +@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('--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': 'core', 'class': 'list[ProviderRemoteRegionName]'}) +@cli_util.wrap_exceptions +def list_provider_remote_regions(ctx, from_json, all_pages, page_size, provider_service_id, limit, page): + + if all_pages and limit: + raise click.UsageError('If you provide the --all option you cannot provide the --limit option') + + if isinstance(provider_service_id, six.string_types) and len(provider_service_id.strip()) == 0: + raise click.UsageError('Parameter --provider-service-id cannot be whitespace or empty string') + + kwargs = {} + if limit is not None: + kwargs['limit'] = limit + if page is not None: + kwargs['page'] = page + kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id']) + client = cli_util.build_client('core', 'virtual_network', ctx) + if all_pages: + if page_size: + kwargs['limit'] = page_size + + result = cli_util.list_call_get_all_results( + client.list_provider_remote_regions, + provider_service_id=provider_service_id, + **kwargs + ) + elif limit is not None: + result = cli_util.list_call_get_up_to_limit( + client.list_provider_remote_regions, + limit, + page_size, + provider_service_id=provider_service_id, + **kwargs + ) + else: + result = client.list_provider_remote_regions( + provider_service_id=provider_service_id, + **kwargs + ) + cli_util.render_response(result, ctx) + + @public_ip_pool_group.command(name=cli_util.override('virtual_network.list_public_ip_pools.command_name', 'list'), help=u"""Lists the public IP pools in the specified compartment. You can filter the list using query parameters. \n[Command Reference](listPublicIpPools)""") @cli_util.option('--compartment-id', required=True, help=u"""The [OCID] of the compartment.""") @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]. diff --git a/services/core/tests/util/generated/command_to_api.py b/services/core/tests/util/generated/command_to_api.py index 43366f795..9a0b19a63 100644 --- a/services/core/tests/util/generated/command_to_api.py +++ b/services/core/tests/util/generated/command_to_api.py @@ -201,6 +201,7 @@ "virtual_network.list_network_security_group_vnics": "oci.core.VirtualNetworkClient.list_network_security_group_vnics", "virtual_network.list_network_security_groups": "oci.core.VirtualNetworkClient.list_network_security_groups", "virtual_network.list_private_ips": "oci.core.VirtualNetworkClient.list_private_ips", + "virtual_network.list_provider_remote_regions": "oci.core.VirtualNetworkClient.list_provider_remote_regions", "virtual_network.list_public_ip_pools": "oci.core.VirtualNetworkClient.list_public_ip_pools", "virtual_network.list_public_ips": "oci.core.VirtualNetworkClient.list_public_ips", "virtual_network.list_remote_peering_connections": "oci.core.VirtualNetworkClient.list_remote_peering_connections", diff --git a/services/database/src/oci_cli_database/database_cli_extended.py b/services/database/src/oci_cli_database/database_cli_extended.py index 027447749..4129880f1 100644 --- a/services/database/src/oci_cli_database/database_cli_extended.py +++ b/services/database/src/oci_cli_database/database_cli_extended.py @@ -1469,6 +1469,7 @@ def patch_db_system(ctx, **kwargs): @cli_util.option('--patch-action', help="""The action to perform on the patch.""") @cli_util.option('--patch-id', help="""The OCID of the patch.""") @cli_util.option('--update-action', help="""The action to perform on the update.""") +@cli_util.option('--update-mode', help="""The update mode applicable to OS Update.""") @cli_util.option('--update-id', help="""The [OCID](/Content/General/Concepts/identifiers.htm) of the maintenance update.""") @cli_util.option('--gi-image-id', help="""The [OCID](/Content/General/Concepts/identifiers.htm) of the grid infrastructure software image. This is a database software image of type `GRID_IMAGE`.""") @cli_util.option('--data-collection-options', type=custom_types.CLI_COMPLEX_TYPE, help=DATA_COLLECTION_OPTIONS_HELP) @@ -1489,6 +1490,7 @@ def update_vm_cluster_extended(ctx, **kwargs): } update_action = kwargs.get('update_action') + update_mode = kwargs.get('update_mode') update_id = kwargs.get('update_id') gi_image_id = kwargs.get('gi_image_id') if update_id and gi_image_id: @@ -1497,11 +1499,15 @@ def update_vm_cluster_extended(ctx, **kwargs): raise click.UsageError('--update-id or --gi-image-id is required if --update-action is specified') elif (update_id or gi_image_id) and not update_action: raise click.UsageError('--update-action is required if --update-id or --gi-image-id is specified') + elif update_mode is not None and not update_id: + raise click.UsageError('--update-mode is only required if --update-id is specified to perform DomU OS Update') elif update_id and update_action: kwargs['update_details'] = { "updateAction": update_action, "updateId": update_id } + if update_mode is not None: + kwargs['update_details']['updateMode'] = update_mode elif gi_image_id and update_action: kwargs['update_details'] = { "updateAction": update_action, @@ -1514,6 +1520,7 @@ def update_vm_cluster_extended(ctx, **kwargs): del kwargs['update_action'] del kwargs['update_id'] del kwargs['gi_image_id'] + del kwargs['update_mode'] ctx.invoke(database_cli.update_vm_cluster, **kwargs) @@ -2125,6 +2132,7 @@ def list_cloud_vm_clusters(ctx, **kwargs): @cli_util.copy_params_from_generated_command(database_cli.update_cloud_vm_cluster, params_to_exclude=['ssh_public_keys', 'update_details', 'data_collection_options']) @database_cli.cloud_vm_cluster_group.command(name='update', help=database_cli.update_cloud_vm_cluster.help) @cli_util.option('--update-action', help="""The action to perform on the update.""") +@cli_util.option('--update-mode', help="""The update mode applicable to OS Update.""") @cli_util.option('--update-id', help="""The [OCID](/Content/General/Concepts/identifiers.htm) of the maintenance update.""") @cli_util.option('--gi-image-id', help="""The [OCID](/Content/General/Concepts/identifiers.htm) of the grid infrastructure software image. This is a database software image of type `GRID_IMAGE`.""") @cli_util.option('--ssh-authorized-keys-file', type=click.File('r'), help="""A file containing one or more public SSH keys to use for SSH access to the cloud VM cluster. Use a newline character to separate multiple keys. The length of the combined keys cannot exceed 10,000 characters.""") @@ -2138,6 +2146,7 @@ def update_cloud_vm_cluster(ctx, **kwargs): kwargs['ssh_public_keys'] = json.dumps(content) update_action = kwargs.get('update_action') + update_mode = kwargs.get('update_mode') update_id = kwargs.get('update_id') gi_image_id = kwargs.get('gi_image_id') if update_id and gi_image_id: @@ -2146,11 +2155,15 @@ def update_cloud_vm_cluster(ctx, **kwargs): raise click.UsageError('--update-id or --gi-image-id is required if --update-action is specified') elif (update_id or gi_image_id) and not update_action: raise click.UsageError('--update-action is required if --update-id or --gi-image-id is specified') + elif update_mode is not None and not update_id: + raise click.UsageError('--update-mode is only required if --update-id is specified to perform DomU OS Update') elif update_id and update_action: kwargs['update_details'] = { "updateAction": update_action, "updateId": update_id } + if update_mode is not None: + kwargs['update_details']['updateMode'] = update_mode elif gi_image_id and update_action: kwargs['update_details'] = { "updateAction": update_action, @@ -2162,6 +2175,7 @@ def update_cloud_vm_cluster(ctx, **kwargs): del kwargs['update_action'] del kwargs['update_id'] del kwargs['gi_image_id'] + del kwargs['update_mode'] ctx.invoke(database_cli.update_cloud_vm_cluster, **kwargs) diff --git a/services/database/src/oci_cli_database/generated/database_cli.py b/services/database/src/oci_cli_database/generated/database_cli.py index a811bb23e..b0aa83f2d 100644 --- a/services/database/src/oci_cli_database/generated/database_cli.py +++ b/services/database/src/oci_cli_database/generated/database_cli.py @@ -174,6 +174,12 @@ def execution_window_group(): pass +@click.command(cli_util.override('db.basecc_vm_cluster_update_history_entry_group.command_name', 'basecc-vm-cluster-update-history-entry'), cls=CommandGroupWithAlias, help="""The record of a maintenance update action on a specified BaseDB-C@C VM cluster.""") +@cli_util.help_option_group +def basecc_vm_cluster_update_history_entry_group(): + pass + + @click.command(cli_util.override('db.gi_minor_version_summary_group.command_name', 'gi-minor-version-summary'), cls=CommandGroupWithAlias, help="""The Oracle Grid Infrastructure (GI) minor version. To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized, talk to an administrator. If you're an administrator who needs to write policies to give users access, see [Getting Started with Policies].""") @@ -194,6 +200,12 @@ def pdb_conversion_history_entry_group(): pass +@click.command(cli_util.override('db.basecc_vm_cluster_group.command_name', 'basecc-vm-cluster'), cls=CommandGroupWithAlias, help="""Details of the BaseDB-C@C VM cluster resource. Applies to Base Database Service on Cloud@Customer instances only.""") +@cli_util.help_option_group +def basecc_vm_cluster_group(): + pass + + @click.command(cli_util.override('db.cloud_exadata_infrastructure_group.command_name', 'cloud-exadata-infrastructure'), cls=CommandGroupWithAlias, help="""Details of the cloud Exadata infrastructure resource. Applies to Exadata Cloud Service instances only.""") @cli_util.help_option_group def cloud_exadata_infrastructure_group(): @@ -434,6 +446,12 @@ def autonomous_container_database_dataguard_association_group(): pass +@click.command(cli_util.override('db.basecc_vm_cluster_update_group.command_name', 'basecc-vm-cluster-update'), cls=CommandGroupWithAlias, help="""Maintenance update details for a BaseDB-C@C VM cluster.""") +@cli_util.help_option_group +def basecc_vm_cluster_update_group(): + pass + + @click.command(cli_util.override('db.db_system_os_patch_history_entry_group.command_name', 'db-system-os-patch-history-entry'), cls=CommandGroupWithAlias, help="""The record of an OS patch action on a DB system.""") @cli_util.help_option_group def db_system_os_patch_history_entry_group(): @@ -582,9 +600,11 @@ def system_version_minor_version_collection_group(): db_root_group.add_command(autonomous_exadata_infrastructure_shape_group) db_root_group.add_command(db_system_os_patch_history_entry_collection_group) db_root_group.add_command(execution_window_group) +db_root_group.add_command(basecc_vm_cluster_update_history_entry_group) db_root_group.add_command(gi_minor_version_summary_group) db_root_group.add_command(autonomous_exadata_infrastructure_group) db_root_group.add_command(pdb_conversion_history_entry_group) +db_root_group.add_command(basecc_vm_cluster_group) db_root_group.add_command(cloud_exadata_infrastructure_group) db_root_group.add_command(backup_destination_group) db_root_group.add_command(maintenance_run_group) @@ -623,6 +643,7 @@ def system_version_minor_version_collection_group(): db_root_group.add_command(external_backup_job_group) db_root_group.add_command(autonomous_database_character_sets_group) db_root_group.add_command(autonomous_container_database_dataguard_association_group) +db_root_group.add_command(basecc_vm_cluster_update_group) db_root_group.add_command(db_system_os_patch_history_entry_group) db_root_group.add_command(exadata_infrastructure_un_allocated_resources_group) db_root_group.add_command(db_system_group) @@ -1799,6 +1820,75 @@ def change_backup_destination_compartment(ctx, from_json, wait_for_state, max_wa cli_util.render_response(result, ctx) +@basecc_vm_cluster_group.command(name=cli_util.override('db.change_basecc_vm_cluster_compartment.command_name', 'change-compartment'), help=u"""Moves a BaseDB-C@C VM cluster and its dependent resources to another compartment. Applies to Base Database Service on Cloud@Customer instances only. \n[Command Reference](changeBaseccVmClusterCompartment)""") +@cli_util.option('--compartment-id', required=True, help=u"""The [OCID] of the compartment.""") +@cli_util.option('--basecc-vm-cluster-id', required=True, help=u"""The BaseDB-C@C VM cluster [OCID].""") +@cli_util.option('--if-match', help=u"""For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.""") +@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED"]), 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 SUCCEEDED 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_basecc_vm_cluster_compartment(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, compartment_id, basecc_vm_cluster_id, if_match): + + if isinstance(basecc_vm_cluster_id, six.string_types) and len(basecc_vm_cluster_id.strip()) == 0: + raise click.UsageError('Parameter --basecc-vm-cluster-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('database', 'database', ctx) + result = client.change_basecc_vm_cluster_compartment( + basecc_vm_cluster_id=basecc_vm_cluster_id, + change_basecc_vm_cluster_compartment_details=_details, + **kwargs + ) + work_request_client = cli_util.build_client('work_requests', 'work_request', ctx) + if wait_for_state: + + if hasattr(work_request_client, 'get_work_request') and callable(getattr(work_request_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(work_request_client, work_request_client.get_work_request(result.headers['opc-work-request-id']), 'status', wait_for_state, **wait_period_kwargs) + if hasattr(result, "data") and hasattr(result.data, "resources") and len(result.data.resources) == 1: + entity_type = result.data.resources[0].entity_type + identifier = result.data.resources[0].identifier + get_operation = 'get_' + entity_type + if hasattr(client, get_operation) and callable(getattr(client, get_operation)): + result = getattr(client, get_operation)(identifier) + + 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) + + @cloud_autonomous_vm_cluster_group.command(name=cli_util.override('db.change_cloud_autonomous_vm_cluster_compartment.command_name', 'change-compartment'), help=u"""Moves an Autonomous Exadata VM cluster in the Oracle cloud and its dependent resources to another compartment. For Exadata Cloud@Customer systems, see [ChangeAutonomousVmClusterCompartment]. \n[Command Reference](changeCloudAutonomousVmClusterCompartment)""") @cli_util.option('--compartment-id', required=True, help=u"""The [OCID] of the compartment.""") @cli_util.option('--cloud-autonomous-vm-cluster-id', required=True, help=u"""The Cloud VM cluster [OCID].""") @@ -12429,6 +12519,129 @@ def create_backup_destination_create_recovery_appliance_backup_destination_detai cli_util.render_response(result, ctx) +@basecc_vm_cluster_group.command(name=cli_util.override('db.create_basecc_vm_cluster.command_name', 'create'), help=u"""Creates a BaseDB-C@C VM cluster. \n[Command Reference](createBaseccVmCluster)""") +@cli_util.option('--compartment-id', required=True, help=u"""The [OCID] of the compartment.""") +@cli_util.option('--cpu-core-count', required=True, type=click.INT, help=u"""Total CPU cores for the BaseDB C@C VM cluster.""") +@cli_util.option('--base-infrastructure-id', required=True, help=u"""The [OCID] of Oracle Data Cloud@Customer Infrastructure.""") +@cli_util.option('--base-vm-cluster-network-id', required=True, help=u"""The [OCID] of BaseDB-C@C VM Cluster Network.""") +@cli_util.option('--gi-version', required=True, help=u"""A valid Oracle Grid Infrastructure (GI) software version.""") +@cli_util.option('--display-name', required=True, help=u"""The user-friendly name for the Base Database Service on Cloud@Customer (BaseDB-C@C) VM cluster. The name does not need to be unique.""") +@cli_util.option('--ssh-public-keys', required=True, type=custom_types.CLI_COMPLEX_TYPE, help=u"""The public key portion of one or more key pairs used for SSH access to the VMs of Base Database Service on Cloud@Customer (BaseDB-C@C) VM cluster.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP) +@cli_util.option('--database-edition', type=custom_types.CliCaseInsensitiveChoice(["STANDARD_EDITION", "ENTERPRISE_EDITION", "ENTERPRISE_EDITION_HIGH_PERFORMANCE", "ENTERPRISE_EDITION_EXTREME_PERFORMANCE", "ENTERPRISE_EDITION_DEVELOPER"]), help=u"""The Oracle Database Edition that applies to all the databases on the DB system. Exadata DB systems and 2-node RAC DB systems require ENTERPRISE_EDITION_EXTREME_PERFORMANCE.""") +@cli_util.option('--node-count', type=click.INT, help=u"""The number of nodes in the Base Database Service on Cloud@Customer (BaseDB-C@C) VM cluster.""") +@cli_util.option('--db-server-id', help=u"""The [OCID] of the compute node of the Oracle Data Cloud@Customer Infrastructure, on which the VM should be launched. Note: Applies to single node Base Database Service on Cloud@Customer (BaseDB-C@C) VM clusters only""") +@cli_util.option('--data-collection-options', type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP) +@cli_util.option('--description', help=u"""The description for Base Database Service on Cloud@Customer (BaseDB-C@C) VM cluster.""") +@cli_util.option('--time-zone', help=u"""The time zone to use for the Base Database Service on Cloud@Customer (BaseDB-C@C) VM cluster. For details, see [Time Zones].""") +@cli_util.option('--additional-vm-storage-size-in-gbs', type=click.INT, help=u"""Total /u01 partition size (GB) for the Base Database Service on Cloud@Customer (BaseDB-C@C) VM cluster.""") +@cli_util.option('--data-storage-size-in-gbs', type=click.INT, help=u"""The DATA Disk Group size in GB for the Base Database Service on Cloud@Customer (BaseDB-C@C) VM cluster.""") +@cli_util.option('--reco-storage-size-in-gbs', type=click.INT, help=u"""The RECO Disk Group size in GB for the Base Database Service on Cloud@Customer (BaseDB-C@C) VM cluster.""") +@cli_util.option('--memory-size-in-gbs', type=click.INT, help=u"""The total memory to be allocated, in GBs, for the Base Database Service on Cloud@Customer (BaseDB-C@C) VM cluster. The minimum is 11GB for every 4 ECPU.""") +@cli_util.option('--license-model', type=custom_types.CliCaseInsensitiveChoice(["LICENSE_INCLUDED", "BRING_YOUR_OWN_LICENSE"]), help=u"""The Oracle license model that applies to the Base Database Service on Cloud@Customer (BaseDB-C@C) VM cluster. The default is LICENSE_INCLUDED.""") +@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].""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP) +@cli_util.option('--vm-cluster-type', type=custom_types.CliCaseInsensitiveChoice(["REGULAR", "DEVELOPER"]), help=u"""The cluster type for the Base Database Service on Cloud@Customer (BaseDB-C@C) VM cluster.""") +@cli_util.option('--cloud-automation-update-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(["PROVISIONING", "AVAILABLE", "UPDATING", "TERMINATING", "TERMINATED", "FAILED", "MAINTENANCE_IN_PROGRESS"]), 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 PROVISIONING --wait-for-state MAINTENANCE_IN_PROGRESS 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({'data-collection-options': {'module': 'database', 'class': 'DataCollectionOptions'}, 'ssh-public-keys': {'module': 'database', 'class': 'list[string]'}, 'freeform-tags': {'module': 'database', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'database', 'class': 'dict(str, dict(str, object))'}, 'cloud-automation-update-details': {'module': 'database', 'class': 'CloudAutomationUpdateDetails'}}) +@cli_util.help_option +@click.pass_context +@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'data-collection-options': {'module': 'database', 'class': 'DataCollectionOptions'}, 'ssh-public-keys': {'module': 'database', 'class': 'list[string]'}, 'freeform-tags': {'module': 'database', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'database', 'class': 'dict(str, dict(str, object))'}, 'cloud-automation-update-details': {'module': 'database', 'class': 'CloudAutomationUpdateDetails'}}, output_type={'module': 'database', 'class': 'BaseccVmCluster'}) +@cli_util.wrap_exceptions +def create_basecc_vm_cluster(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, compartment_id, cpu_core_count, base_infrastructure_id, base_vm_cluster_network_id, gi_version, display_name, ssh_public_keys, database_edition, node_count, db_server_id, data_collection_options, description, time_zone, additional_vm_storage_size_in_gbs, data_storage_size_in_gbs, reco_storage_size_in_gbs, memory_size_in_gbs, license_model, freeform_tags, defined_tags, vm_cluster_type, cloud_automation_update_details): + + kwargs = {} + kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id']) + + _details = {} + _details['compartmentId'] = compartment_id + _details['cpuCoreCount'] = cpu_core_count + _details['baseInfrastructureId'] = base_infrastructure_id + _details['baseVmClusterNetworkId'] = base_vm_cluster_network_id + _details['giVersion'] = gi_version + _details['displayName'] = display_name + _details['sshPublicKeys'] = cli_util.parse_json_parameter("ssh_public_keys", ssh_public_keys) + + if database_edition is not None: + _details['databaseEdition'] = database_edition + + if node_count is not None: + _details['nodeCount'] = node_count + + if db_server_id is not None: + _details['dbServerId'] = db_server_id + + if data_collection_options is not None: + _details['dataCollectionOptions'] = cli_util.parse_json_parameter("data_collection_options", data_collection_options) + + if description is not None: + _details['description'] = description + + if time_zone is not None: + _details['timeZone'] = time_zone + + if additional_vm_storage_size_in_gbs is not None: + _details['additionalVmStorageSizeInGBs'] = additional_vm_storage_size_in_gbs + + if data_storage_size_in_gbs is not None: + _details['dataStorageSizeInGBs'] = data_storage_size_in_gbs + + if reco_storage_size_in_gbs is not None: + _details['recoStorageSizeInGBs'] = reco_storage_size_in_gbs + + if memory_size_in_gbs is not None: + _details['memorySizeInGBs'] = memory_size_in_gbs + + if license_model is not None: + _details['licenseModel'] = license_model + + 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 vm_cluster_type is not None: + _details['vmClusterType'] = vm_cluster_type + + if cloud_automation_update_details is not None: + _details['cloudAutomationUpdateDetails'] = cli_util.parse_json_parameter("cloud_automation_update_details", cloud_automation_update_details) + + client = cli_util.build_client('database', 'database', ctx) + result = client.create_basecc_vm_cluster( + create_basecc_vm_cluster_details=_details, + **kwargs + ) + if wait_for_state: + + if hasattr(client, 'get_basecc_vm_cluster') and callable(getattr(client, 'get_basecc_vm_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_basecc_vm_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) + + @cloud_autonomous_vm_cluster_group.command(name=cli_util.override('db.create_cloud_autonomous_vm_cluster.command_name', 'create'), help=u"""Creates an Autonomous Exadata VM cluster in the Oracle cloud. For Exadata Cloud@Customer systems, see [CreateAutonomousVmCluster]. \n[Command Reference](createCloudAutonomousVmCluster)""") @cli_util.option('--compartment-id', required=True, help=u"""The [OCID] of the compartment.""") @cli_util.option('--subnet-id', required=True, help=u"""The [OCID] of the subnet the cloud Autonomous VM Cluster is associated with.""") @@ -14320,7 +14533,7 @@ def create_database_create_database_from_backup(ctx, from_json, wait_for_state, @cli_util.option('--compartment-id', required=True, help=u"""The [OCID] of the compartment the database software image belongs in.""") @cli_util.option('--display-name', required=True, help=u"""The user-friendly name for the database software image. The name does not have to be unique.""") @cli_util.option('--database-version', help=u"""The database version with which the database software image is to be built.""") -@cli_util.option('--image-shape-family', type=custom_types.CliCaseInsensitiveChoice(["VM_BM_SHAPE", "EXADATA_SHAPE", "EXACC_SHAPE", "EXADBXS_SHAPE"]), help=u"""To what shape the image is meant for.""") +@cli_util.option('--image-shape-family', type=custom_types.CliCaseInsensitiveChoice(["VM_BM_SHAPE", "EXADATA_SHAPE", "EXACC_SHAPE", "EXADBXS_SHAPE", "BDBCC_SHAPE"]), help=u"""To what shape the image is meant for.""") @cli_util.option('--image-type', type=custom_types.CliCaseInsensitiveChoice(["GRID_IMAGE", "DATABASE_IMAGE"]), help=u"""The type of software image. Can be grid or database.""") @cli_util.option('--patch-set', help=u"""The PSU or PBP or Release Updates. To get a list of supported versions, use the [ListDbVersions] operation.""") @cli_util.option('--database-software-image-one-off-patches', type=custom_types.CLI_COMPLEX_TYPE, help=u"""List of one-off patches for Database Homes.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP) @@ -17682,6 +17895,63 @@ def delete_backup_destination(ctx, from_json, wait_for_state, max_wait_seconds, cli_util.render_response(result, ctx) +@basecc_vm_cluster_group.command(name=cli_util.override('db.delete_basecc_vm_cluster.command_name', 'delete'), help=u"""Deletes the specified BaseDB-C@C VM cluster. Applies to Base Database Service on Cloud@Customer instances only. \n[Command Reference](deleteBaseccVmCluster)""") +@cli_util.option('--basecc-vm-cluster-id', required=True, help=u"""The BaseDB-C@C VM cluster [OCID].""") +@cli_util.option('--if-match', help=u"""For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.""") +@cli_util.confirm_delete_option +@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED"]), 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 SUCCEEDED 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_basecc_vm_cluster(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, basecc_vm_cluster_id, if_match): + + if isinstance(basecc_vm_cluster_id, six.string_types) and len(basecc_vm_cluster_id.strip()) == 0: + raise click.UsageError('Parameter --basecc-vm-cluster-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('database', 'database', ctx) + result = client.delete_basecc_vm_cluster( + basecc_vm_cluster_id=basecc_vm_cluster_id, + **kwargs + ) + work_request_client = cli_util.build_client('work_requests', 'work_request', ctx) + if wait_for_state: + + if hasattr(work_request_client, 'get_work_request') and callable(getattr(work_request_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(work_request_client, work_request_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) + + @cloud_autonomous_vm_cluster_group.command(name=cli_util.override('db.delete_cloud_autonomous_vm_cluster.command_name', 'delete'), help=u"""Deletes the specified Autonomous Exadata VM cluster in the Oracle cloud. For Exadata Cloud@Customer systems, see [DeleteAutonomousVmCluster]. \n[Command Reference](deleteCloudAutonomousVmCluster)""") @cli_util.option('--cloud-autonomous-vm-cluster-id', required=True, help=u"""The Cloud VM cluster [OCID].""") @cli_util.option('--if-match', help=u"""For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.""") @@ -22134,6 +22404,82 @@ def get_backup_destination(ctx, from_json, backup_destination_id): cli_util.render_response(result, ctx) +@basecc_vm_cluster_group.command(name=cli_util.override('db.get_basecc_vm_cluster.command_name', 'get'), help=u"""Gets information about the BaseDB-C@C VM cluster. Applies to Base Database Service on Cloud@Customer instances only. \n[Command Reference](getBaseccVmCluster)""") +@cli_util.option('--basecc-vm-cluster-id', required=True, help=u"""The BaseDB-C@C VM cluster [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': 'database', 'class': 'BaseccVmCluster'}) +@cli_util.wrap_exceptions +def get_basecc_vm_cluster(ctx, from_json, basecc_vm_cluster_id): + + if isinstance(basecc_vm_cluster_id, six.string_types) and len(basecc_vm_cluster_id.strip()) == 0: + raise click.UsageError('Parameter --basecc-vm-cluster-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('database', 'database', ctx) + result = client.get_basecc_vm_cluster( + basecc_vm_cluster_id=basecc_vm_cluster_id, + **kwargs + ) + cli_util.render_response(result, ctx) + + +@basecc_vm_cluster_update_group.command(name=cli_util.override('db.get_basecc_vm_cluster_update.command_name', 'get'), help=u"""Gets information about a specified maintenance update package for a BaseDB-C@C VM cluster. Applies to Base Database Service on Cloud@Customer instances only. \n[Command Reference](getBaseccVmClusterUpdate)""") +@cli_util.option('--basecc-vm-cluster-id', required=True, help=u"""The BaseDB-C@C VM cluster [OCID].""") +@cli_util.option('--update-id', required=True, help=u"""The [OCID] of the maintenance update.""") +@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': 'database', 'class': 'BaseccVmClusterUpdate'}) +@cli_util.wrap_exceptions +def get_basecc_vm_cluster_update(ctx, from_json, basecc_vm_cluster_id, update_id): + + if isinstance(basecc_vm_cluster_id, six.string_types) and len(basecc_vm_cluster_id.strip()) == 0: + raise click.UsageError('Parameter --basecc-vm-cluster-id cannot be whitespace or empty string') + + if isinstance(update_id, six.string_types) and len(update_id.strip()) == 0: + raise click.UsageError('Parameter --update-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('database', 'database', ctx) + result = client.get_basecc_vm_cluster_update( + basecc_vm_cluster_id=basecc_vm_cluster_id, + update_id=update_id, + **kwargs + ) + cli_util.render_response(result, ctx) + + +@basecc_vm_cluster_update_history_entry_group.command(name=cli_util.override('db.get_basecc_vm_cluster_update_history_entry.command_name', 'get'), help=u"""Gets the maintenance update history details for the specified update history entry. Applies to Base Database Service on Cloud@Customer instances only. \n[Command Reference](getBaseccVmClusterUpdateHistoryEntry)""") +@cli_util.option('--basecc-vm-cluster-id', required=True, help=u"""The BaseDB-C@C VM cluster [OCID].""") +@cli_util.option('--update-history-entry-id', required=True, help=u"""The [OCID] of the maintenance update history entry.""") +@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': 'database', 'class': 'BaseccVmClusterUpdateHistoryEntry'}) +@cli_util.wrap_exceptions +def get_basecc_vm_cluster_update_history_entry(ctx, from_json, basecc_vm_cluster_id, update_history_entry_id): + + if isinstance(basecc_vm_cluster_id, six.string_types) and len(basecc_vm_cluster_id.strip()) == 0: + raise click.UsageError('Parameter --basecc-vm-cluster-id cannot be whitespace or empty string') + + if isinstance(update_history_entry_id, six.string_types) and len(update_history_entry_id.strip()) == 0: + raise click.UsageError('Parameter --update-history-entry-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('database', 'database', ctx) + result = client.get_basecc_vm_cluster_update_history_entry( + basecc_vm_cluster_id=basecc_vm_cluster_id, + update_history_entry_id=update_history_entry_id, + **kwargs + ) + cli_util.render_response(result, ctx) + + @cloud_autonomous_vm_cluster_group.command(name=cli_util.override('db.get_cloud_autonomous_vm_cluster.command_name', 'get'), help=u"""Gets information about the specified Autonomous Exadata VM cluster in the Oracle cloud. For Exadata Cloud@Custustomer systems, see [GetAutonomousVmCluster ]. \n[Command Reference](getCloudAutonomousVmCluster)""") @cli_util.option('--cloud-autonomous-vm-cluster-id', required=True, help=u"""The Cloud VM cluster [OCID].""") @json_skeleton_utils.get_cli_json_input_option({}) @@ -26419,6 +26765,191 @@ def list_backups(ctx, from_json, all_pages, page_size, database_id, compartment_ cli_util.render_response(result, ctx) +@basecc_vm_cluster_update_history_entry_group.command(name=cli_util.override('db.list_basecc_vm_cluster_update_history_entries.command_name', 'list'), help=u"""Gets the history of the maintenance update actions performed on the specified BaseDB-C@C VM cluster. Applies to Base Database Service on Cloud@Customer instances only. \n[Command Reference](listBaseccVmClusterUpdateHistoryEntries)""") +@cli_util.option('--basecc-vm-cluster-id', required=True, help=u"""The BaseDB-C@C VM cluster [OCID].""") +@cli_util.option('--update-type', type=custom_types.CliCaseInsensitiveChoice(["GI_UPGRADE", "GI_PATCH", "OS_UPDATE"]), help=u"""A filter to return only resources that match the given update type exactly.""") +@cli_util.option('--lifecycle-state', type=custom_types.CliCaseInsensitiveChoice(["IN_PROGRESS", "SUCCEEDED", "FAILED"]), help=u"""A filter to return only resources that match the given lifecycle state exactly.""") +@cli_util.option('--limit', type=click.INT, help=u"""The maximum number of items to return per page.""") +@cli_util.option('--page', help=u"""The pagination token to continue listing from.""") +@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': 'database', 'class': 'list[BaseccVmClusterUpdateHistoryEntrySummary]'}) +@cli_util.wrap_exceptions +def list_basecc_vm_cluster_update_history_entries(ctx, from_json, all_pages, page_size, basecc_vm_cluster_id, update_type, lifecycle_state, limit, page): + + if all_pages and limit: + raise click.UsageError('If you provide the --all option you cannot provide the --limit option') + + if isinstance(basecc_vm_cluster_id, six.string_types) and len(basecc_vm_cluster_id.strip()) == 0: + raise click.UsageError('Parameter --basecc-vm-cluster-id cannot be whitespace or empty string') + + kwargs = {} + if update_type is not None: + kwargs['update_type'] = update_type + if lifecycle_state is not None: + kwargs['lifecycle_state'] = lifecycle_state + if limit is not None: + kwargs['limit'] = limit + if page is not None: + kwargs['page'] = page + kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id']) + client = cli_util.build_client('database', 'database', ctx) + if all_pages: + if page_size: + kwargs['limit'] = page_size + + result = cli_util.list_call_get_all_results( + client.list_basecc_vm_cluster_update_history_entries, + basecc_vm_cluster_id=basecc_vm_cluster_id, + **kwargs + ) + elif limit is not None: + result = cli_util.list_call_get_up_to_limit( + client.list_basecc_vm_cluster_update_history_entries, + limit, + page_size, + basecc_vm_cluster_id=basecc_vm_cluster_id, + **kwargs + ) + else: + result = client.list_basecc_vm_cluster_update_history_entries( + basecc_vm_cluster_id=basecc_vm_cluster_id, + **kwargs + ) + cli_util.render_response(result, ctx) + + +@basecc_vm_cluster_update_group.command(name=cli_util.override('db.list_basecc_vm_cluster_updates.command_name', 'list'), help=u"""Lists the maintenance updates that can be applied to the specified BaseDB-C@C VM cluster. Applies to Base Database Service on Cloud@Customer instances only. \n[Command Reference](listBaseccVmClusterUpdates)""") +@cli_util.option('--basecc-vm-cluster-id', required=True, help=u"""The BaseDB-C@C VM cluster [OCID].""") +@cli_util.option('--update-type', type=custom_types.CliCaseInsensitiveChoice(["GI_UPGRADE", "GI_PATCH", "OS_UPDATE"]), help=u"""A filter to return only resources that match the given update type exactly.""") +@cli_util.option('--lifecycle-state', type=custom_types.CliCaseInsensitiveChoice(["AVAILABLE", "SUCCESS", "IN_PROGRESS", "FAILED"]), help=u"""A filter to return only resources that match the given lifecycle state exactly.""") +@cli_util.option('--limit', type=click.INT, help=u"""The maximum number of items to return per page.""") +@cli_util.option('--page', help=u"""The pagination token to continue listing from.""") +@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': 'database', 'class': 'list[BaseccVmClusterUpdateSummary]'}) +@cli_util.wrap_exceptions +def list_basecc_vm_cluster_updates(ctx, from_json, all_pages, page_size, basecc_vm_cluster_id, update_type, lifecycle_state, limit, page): + + if all_pages and limit: + raise click.UsageError('If you provide the --all option you cannot provide the --limit option') + + if isinstance(basecc_vm_cluster_id, six.string_types) and len(basecc_vm_cluster_id.strip()) == 0: + raise click.UsageError('Parameter --basecc-vm-cluster-id cannot be whitespace or empty string') + + kwargs = {} + if update_type is not None: + kwargs['update_type'] = update_type + if lifecycle_state is not None: + kwargs['lifecycle_state'] = lifecycle_state + if limit is not None: + kwargs['limit'] = limit + if page is not None: + kwargs['page'] = page + kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id']) + client = cli_util.build_client('database', 'database', ctx) + if all_pages: + if page_size: + kwargs['limit'] = page_size + + result = cli_util.list_call_get_all_results( + client.list_basecc_vm_cluster_updates, + basecc_vm_cluster_id=basecc_vm_cluster_id, + **kwargs + ) + elif limit is not None: + result = cli_util.list_call_get_up_to_limit( + client.list_basecc_vm_cluster_updates, + limit, + page_size, + basecc_vm_cluster_id=basecc_vm_cluster_id, + **kwargs + ) + else: + result = client.list_basecc_vm_cluster_updates( + basecc_vm_cluster_id=basecc_vm_cluster_id, + **kwargs + ) + cli_util.render_response(result, ctx) + + +@basecc_vm_cluster_group.command(name=cli_util.override('db.list_basecc_vm_clusters.command_name', 'list'), help=u"""Lists the BaseDB-C@C VM clusters in the specified compartment. Applies to Base Database Service on Cloud@Customer instances only. \n[Command Reference](listBaseccVmClusters)""") +@cli_util.option('--compartment-id', required=True, help=u"""The compartment [OCID].""") +@cli_util.option('--base-infrastructure-id', help=u"""If provided, filters the results for the given Oracle Data Cloud@Customer Infrastructure.""") +@cli_util.option('--limit', type=click.INT, help=u"""The maximum number of items to return per page.""") +@cli_util.option('--page', help=u"""The pagination token to continue listing from.""") +@cli_util.option('--sort-by', type=custom_types.CliCaseInsensitiveChoice(["TIMECREATED", "DISPLAYNAME"]), help=u"""The field to sort by. You can provide one sort order (`sortOrder`). Default order for TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME sort order is case sensitive.""") +@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('--lifecycle-state', type=custom_types.CliCaseInsensitiveChoice(["PROVISIONING", "AVAILABLE", "UPDATING", "TERMINATING", "TERMINATED", "FAILED", "MAINTENANCE_IN_PROGRESS"]), help=u"""A filter to return only resources that match the given lifecycle state exactly.""") +@cli_util.option('--availability-domain', help=u"""A filter to return only resources that match the given availability domain exactly.""") +@cli_util.option('--display-name', help=u"""A filter to return only resources that match the entire display name given. The match is not case sensitive.""") +@cli_util.option('--vm-cluster-type', type=custom_types.CliCaseInsensitiveChoice(["REGULAR", "DEVELOPER"]), help=u"""A filter to return only BaseDB-C@C VM clusters that match the given VM Cluster type exactly.""") +@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': 'database', 'class': 'list[BaseccVmClusterSummary]'}) +@cli_util.wrap_exceptions +def list_basecc_vm_clusters(ctx, from_json, all_pages, page_size, compartment_id, base_infrastructure_id, limit, page, sort_by, sort_order, lifecycle_state, availability_domain, display_name, vm_cluster_type): + + if all_pages and limit: + raise click.UsageError('If you provide the --all option you cannot provide the --limit option') + if sort_by and not availability_domain and not all_pages: + raise click.UsageError('You must provide an --availability-domain when doing a --sort-by, unless you specify the --all parameter') + + kwargs = {} + if base_infrastructure_id is not None: + kwargs['base_infrastructure_id'] = base_infrastructure_id + 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 + if lifecycle_state is not None: + kwargs['lifecycle_state'] = lifecycle_state + if availability_domain is not None: + kwargs['availability_domain'] = availability_domain + if display_name is not None: + kwargs['display_name'] = display_name + if vm_cluster_type is not None: + kwargs['vm_cluster_type'] = vm_cluster_type + kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id']) + client = cli_util.build_client('database', 'database', ctx) + if all_pages: + if page_size: + kwargs['limit'] = page_size + + result = cli_util.list_call_get_all_results( + client.list_basecc_vm_clusters, + compartment_id=compartment_id, + **kwargs + ) + elif limit is not None: + result = cli_util.list_call_get_up_to_limit( + client.list_basecc_vm_clusters, + limit, + page_size, + compartment_id=compartment_id, + **kwargs + ) + else: + result = client.list_basecc_vm_clusters( + compartment_id=compartment_id, + **kwargs + ) + cli_util.render_response(result, ctx) + + @cloud_autonomous_vm_cluster_group.command(name=cli_util.override('db.list_cloud_autonomous_vm_cluster_acd_resource_usage.command_name', 'list-cloud-autonomous-vm-cluster-acd-resource-usage'), help=u"""Gets the list of resource usage details for all the Cloud Autonomous Container Database in the specified Cloud Autonomous Exadata VM cluster. \n[Command Reference](listCloudAutonomousVmClusterAcdResourceUsage)""") @cli_util.option('--cloud-autonomous-vm-cluster-id', required=True, help=u"""The Cloud VM cluster [OCID].""") @cli_util.option('--compartment-id', help=u"""The compartment [OCID].""") @@ -26979,7 +27510,7 @@ def list_data_guard_associations(ctx, from_json, all_pages, page_size, database_ @cli_util.option('--lifecycle-state', type=custom_types.CliCaseInsensitiveChoice(["PROVISIONING", "AVAILABLE", "DELETING", "DELETED", "FAILED", "TERMINATING", "TERMINATED", "UPDATING"]), help=u"""A filter to return only resources that match the given lifecycle state exactly.""") @cli_util.option('--display-name', help=u"""A filter to return only resources that match the entire display name given. The match is not case sensitive.""") @cli_util.option('--image-type', type=custom_types.CliCaseInsensitiveChoice(["GRID_IMAGE", "DATABASE_IMAGE"]), help=u"""A filter to return only resources that match the given image type exactly.""") -@cli_util.option('--image-shape-family', type=custom_types.CliCaseInsensitiveChoice(["VM_BM_SHAPE", "EXADATA_SHAPE", "EXACC_SHAPE", "EXADBXS_SHAPE"]), help=u"""A filter to return only resources that match the given image shape family exactly.""") +@cli_util.option('--image-shape-family', type=custom_types.CliCaseInsensitiveChoice(["VM_BM_SHAPE", "EXADATA_SHAPE", "EXACC_SHAPE", "EXADBXS_SHAPE", "BDBCC_SHAPE"]), help=u"""A filter to return only resources that match the given image shape family exactly.""") @cli_util.option('--patch-set-greater-than-or-equal-to', help=u"""A filter to return only resources with `patchSet` greater than or equal to given value.""") @cli_util.option('--db-system-id', help=u"""The DB system [OCID]. If provided, filters the results to the set of database versions which are supported for the DB system.""") @cli_util.option('--is-upgrade-supported', type=click.BOOL, help=u"""If provided, filters the results to the set of database versions which are supported for Upgrade.""") @@ -28933,6 +29464,7 @@ def list_flex_components(ctx, from_json, all_pages, page_size, compartment_id, n @cli_util.option('--version-parameterconflict', required=True, help=u"""The Oracle Grid Infrastructure major version.""") @cli_util.option('--availability-domain', help=u"""The target availability domain. Only passed if the limit is AD-specific.""") @cli_util.option('--compartment-id', help=u"""The compartment [OCID].""") +@cli_util.option('--exadata-infrastructure-id', help=u"""If provided, filters the results for the given Exadata Infrastructure.""") @cli_util.option('--shape-family', type=custom_types.CliCaseInsensitiveChoice(["SINGLENODE", "YODA", "VIRTUALMACHINE", "EXADATA", "EXACC", "EXADB_XS"]), help=u"""If provided, filters the results to the set of database versions which are supported for the given shape family.""") @cli_util.option('--is-gi-version-for-provisioning', type=click.BOOL, help=u"""If true, returns the Grid Infrastructure versions that can be used for provisioning a cluster""") @cli_util.option('--shape', help=u"""If provided, filters the results for the given shape.""") @@ -28947,7 +29479,7 @@ def list_flex_components(ctx, from_json, all_pages, page_size, compartment_id, n @click.pass_context @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'database', 'class': 'list[GiMinorVersionSummary]'}) @cli_util.wrap_exceptions -def list_gi_version_minor_versions(ctx, from_json, all_pages, page_size, version_parameterconflict, availability_domain, compartment_id, shape_family, is_gi_version_for_provisioning, shape, sort_by, sort_order, limit, page): +def list_gi_version_minor_versions(ctx, from_json, all_pages, page_size, version_parameterconflict, availability_domain, compartment_id, exadata_infrastructure_id, shape_family, is_gi_version_for_provisioning, shape, sort_by, sort_order, limit, page): if all_pages and limit: raise click.UsageError('If you provide the --all option you cannot provide the --limit option') @@ -28962,6 +29494,8 @@ def list_gi_version_minor_versions(ctx, from_json, all_pages, page_size, version kwargs['availability_domain'] = availability_domain if compartment_id is not None: kwargs['compartment_id'] = compartment_id + if exadata_infrastructure_id is not None: + kwargs['exadata_infrastructure_id'] = exadata_infrastructure_id if shape_family is not None: kwargs['shape_family'] = shape_family if is_gi_version_for_provisioning is not None: @@ -31373,6 +31907,75 @@ def register_cloud_vm_cluster_pkcs(ctx, from_json, wait_for_state, max_wait_seco cli_util.render_response(result, ctx) +@exadb_vm_cluster_group.command(name=cli_util.override('db.register_exadb_vm_cluster_pkcs.command_name', 'register-exadb-vm-cluster-pkcs'), help=u"""Install the PKCS11 driver for given keystore type \n[Command Reference](registerExadbVmClusterPkcs)""") +@cli_util.option('--exadb-vm-cluster-id', required=True, help=u"""The Exadata VM cluster [OCID] on Exascale Infrastructure.""") +@cli_util.option('--tde-key-store-type', required=True, type=custom_types.CliCaseInsensitiveChoice(["AZURE", "OCI", "GCP", "AWS"]), help=u"""TDE keystore type""") +@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"]), 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 SUCCEEDED 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 register_exadb_vm_cluster_pkcs(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, exadb_vm_cluster_id, tde_key_store_type, if_match): + + if isinstance(exadb_vm_cluster_id, six.string_types) and len(exadb_vm_cluster_id.strip()) == 0: + raise click.UsageError('Parameter --exadb-vm-cluster-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['tdeKeyStoreType'] = tde_key_store_type + + client = cli_util.build_client('database', 'database', ctx) + result = client.register_exadb_vm_cluster_pkcs( + exadb_vm_cluster_id=exadb_vm_cluster_id, + register_exadb_vm_cluster_pkcs_details=_details, + **kwargs + ) + work_request_client = cli_util.build_client('work_requests', 'work_request', ctx) + if wait_for_state: + + if hasattr(work_request_client, 'get_work_request') and callable(getattr(work_request_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(work_request_client, work_request_client.get_work_request(result.headers['opc-work-request-id']), 'status', wait_for_state, **wait_period_kwargs) + if hasattr(result, "data") and hasattr(result.data, "resources") and len(result.data.resources) == 1: + entity_type = result.data.resources[0].entity_type + identifier = result.data.resources[0].identifier + get_operation = 'get_' + entity_type + if hasattr(client, get_operation) and callable(getattr(client, get_operation)): + result = getattr(client, get_operation)(identifier) + + 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) + + @autonomous_container_database_group.command(name=cli_util.override('db.reinstate_autonomous_container_database_dataguard.command_name', 'reinstate-autonomous-container-database-dataguard'), help=u"""Reinstates a disabled standby Autonomous Container Database (ACD), identified by the autonomousContainerDatabaseId parameter to an active standby ACD. For more information, see [Reinstate the Disabled Standby in an Autonomous Data Guard Configuration]. \n[Command Reference](reinstateAutonomousContainerDatabaseDataguard)""") @cli_util.option('--autonomous-container-database-id', required=True, help=u"""The Autonomous Container Database [OCID].""") @cli_util.option('--if-match', help=u"""For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.""") @@ -34550,6 +35153,75 @@ def unregister_cloud_vm_cluster_pkcs(ctx, from_json, wait_for_state, max_wait_se cli_util.render_response(result, ctx) +@exadb_vm_cluster_group.command(name=cli_util.override('db.unregister_exadb_vm_cluster_pkcs.command_name', 'unregister-exadb-vm-cluster-pkcs'), help=u"""Uninstall the PKCS11 driver for given keystore type \n[Command Reference](unregisterExadbVmClusterPkcs)""") +@cli_util.option('--exadb-vm-cluster-id', required=True, help=u"""The Exadata VM cluster [OCID] on Exascale Infrastructure.""") +@cli_util.option('--tde-key-store-type', required=True, type=custom_types.CliCaseInsensitiveChoice(["AZURE", "OCI", "GCP", "AWS"]), help=u"""TDE keystore type""") +@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"]), 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 SUCCEEDED 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 unregister_exadb_vm_cluster_pkcs(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, exadb_vm_cluster_id, tde_key_store_type, if_match): + + if isinstance(exadb_vm_cluster_id, six.string_types) and len(exadb_vm_cluster_id.strip()) == 0: + raise click.UsageError('Parameter --exadb-vm-cluster-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['tdeKeyStoreType'] = tde_key_store_type + + client = cli_util.build_client('database', 'database', ctx) + result = client.unregister_exadb_vm_cluster_pkcs( + exadb_vm_cluster_id=exadb_vm_cluster_id, + unregister_exadb_vm_cluster_pkcs_details=_details, + **kwargs + ) + work_request_client = cli_util.build_client('work_requests', 'work_request', ctx) + if wait_for_state: + + if hasattr(work_request_client, 'get_work_request') and callable(getattr(work_request_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(work_request_client, work_request_client.get_work_request(result.headers['opc-work-request-id']), 'status', wait_for_state, **wait_period_kwargs) + if hasattr(result, "data") and hasattr(result.data, "resources") and len(result.data.resources) == 1: + entity_type = result.data.resources[0].entity_type + identifier = result.data.resources[0].identifier + get_operation = 'get_' + entity_type + if hasattr(client, get_operation) and callable(getattr(client, get_operation)): + result = getattr(client, get_operation)(identifier) + + 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) + + @advanced_cluster_file_system_group.command(name=cli_util.override('db.update_advanced_cluster_file_system.command_name', 'update'), help=u"""Updates the advanced cluster file system resource. \n[Command Reference](updateAdvancedClusterFileSystem)""") @cli_util.option('--advanced-cluster-file-system-id', required=True, help=u"""The advanced cluster file system Id [OCID].""") @cli_util.option('--storage-in-gbs', type=click.INT, help=u"""The total storage needed for advanced cluster file system in GBs.""") @@ -38377,6 +39049,120 @@ def update_backup_destination(ctx, from_json, force, wait_for_state, max_wait_se cli_util.render_response(result, ctx) +@basecc_vm_cluster_group.command(name=cli_util.override('db.update_basecc_vm_cluster.command_name', 'update'), help=u"""Updates the specified BaseDB-C@C VM cluster. Applies to Base Database Service on Cloud@Customer instances only. \n[Command Reference](updateBaseccVmCluster)""") +@cli_util.option('--basecc-vm-cluster-id', required=True, help=u"""The BaseDB-C@C VM cluster [OCID].""") +@cli_util.option('--cpu-core-count', type=click.INT, help=u"""Total CPU cores for the BaseDB C@C VM cluster.""") +@cli_util.option('--memory-size-in-gbs', type=click.INT, help=u"""The total memory to be allocated, in GBs, for the Base Database Service on Cloud@Customer (BaseDB-C@C) VM cluster. The minimum is 11GB for every 4 ECPU.""") +@cli_util.option('--data-storage-size-in-gbs', type=click.INT, help=u"""The DATA Disk Group size in GB for the Base Database Service on Cloud@Customer (BaseDB-C@C) VM cluster.""") +@cli_util.option('--reco-storage-size-in-gbs', type=click.INT, help=u"""The RECO Disk Group size in GB for the Base Database Service on Cloud@Customer (BaseDB-C@C) VM cluster.""") +@cli_util.option('--license-model', type=custom_types.CliCaseInsensitiveChoice(["LICENSE_INCLUDED", "BRING_YOUR_OWN_LICENSE"]), help=u"""The Oracle license model that applies to the Base Database Service on Cloud@Customer (BaseDB-C@C) VM cluster. The default is LICENSE_INCLUDED.""") +@cli_util.option('--ssh-public-keys', type=custom_types.CLI_COMPLEX_TYPE, help=u"""The public key portion of one or more key pairs used for SSH access to the VMs of Base Database Service on Cloud@Customer (BaseDB-C@C) VM cluster.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP) +@cli_util.option('--display-name', help=u"""The user-friendly name for the Base Database Service on Cloud@Customer (BaseDB-C@C) VM cluster. The name does not need to be unique.""") +@cli_util.option('--additional-vm-storage-size-in-gbs', type=click.INT, help=u"""Total /u01 partition size (GB) for the Base Database Service on Cloud@Customer (BaseDB-C@C) VM cluster.""") +@cli_util.option('--update-details', 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"""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].""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP) +@cli_util.option('--data-collection-options', type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP) +@cli_util.option('--cloud-automation-update-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(["PROVISIONING", "AVAILABLE", "UPDATING", "TERMINATING", "TERMINATED", "FAILED", "MAINTENANCE_IN_PROGRESS"]), 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 PROVISIONING --wait-for-state MAINTENANCE_IN_PROGRESS 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({'ssh-public-keys': {'module': 'database', 'class': 'list[string]'}, 'update-details': {'module': 'database', 'class': 'BaseccVmClusterUpdateDetails'}, 'freeform-tags': {'module': 'database', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'database', 'class': 'dict(str, dict(str, object))'}, 'data-collection-options': {'module': 'database', 'class': 'DataCollectionOptions'}, 'cloud-automation-update-details': {'module': 'database', 'class': 'CloudAutomationUpdateDetails'}}) +@cli_util.help_option +@click.pass_context +@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'ssh-public-keys': {'module': 'database', 'class': 'list[string]'}, 'update-details': {'module': 'database', 'class': 'BaseccVmClusterUpdateDetails'}, 'freeform-tags': {'module': 'database', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'database', 'class': 'dict(str, dict(str, object))'}, 'data-collection-options': {'module': 'database', 'class': 'DataCollectionOptions'}, 'cloud-automation-update-details': {'module': 'database', 'class': 'CloudAutomationUpdateDetails'}}, output_type={'module': 'database', 'class': 'BaseccVmCluster'}) +@cli_util.wrap_exceptions +def update_basecc_vm_cluster(ctx, from_json, force, wait_for_state, max_wait_seconds, wait_interval_seconds, basecc_vm_cluster_id, cpu_core_count, memory_size_in_gbs, data_storage_size_in_gbs, reco_storage_size_in_gbs, license_model, ssh_public_keys, display_name, additional_vm_storage_size_in_gbs, update_details, freeform_tags, defined_tags, data_collection_options, cloud_automation_update_details, if_match): + + if isinstance(basecc_vm_cluster_id, six.string_types) and len(basecc_vm_cluster_id.strip()) == 0: + raise click.UsageError('Parameter --basecc-vm-cluster-id cannot be whitespace or empty string') + if not force: + if ssh_public_keys or update_details or freeform_tags or defined_tags or data_collection_options or cloud_automation_update_details: + if not click.confirm("WARNING: Updates to ssh-public-keys and update-details and freeform-tags and defined-tags and data-collection-options and cloud-automation-update-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 cpu_core_count is not None: + _details['cpuCoreCount'] = cpu_core_count + + if memory_size_in_gbs is not None: + _details['memorySizeInGBs'] = memory_size_in_gbs + + if data_storage_size_in_gbs is not None: + _details['dataStorageSizeInGBs'] = data_storage_size_in_gbs + + if reco_storage_size_in_gbs is not None: + _details['recoStorageSizeInGBs'] = reco_storage_size_in_gbs + + if license_model is not None: + _details['licenseModel'] = license_model + + if ssh_public_keys is not None: + _details['sshPublicKeys'] = cli_util.parse_json_parameter("ssh_public_keys", ssh_public_keys) + + if display_name is not None: + _details['displayName'] = display_name + + if additional_vm_storage_size_in_gbs is not None: + _details['additionalVmStorageSizeInGBs'] = additional_vm_storage_size_in_gbs + + if update_details is not None: + _details['updateDetails'] = cli_util.parse_json_parameter("update_details", update_details) + + 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 data_collection_options is not None: + _details['dataCollectionOptions'] = cli_util.parse_json_parameter("data_collection_options", data_collection_options) + + if cloud_automation_update_details is not None: + _details['cloudAutomationUpdateDetails'] = cli_util.parse_json_parameter("cloud_automation_update_details", cloud_automation_update_details) + + client = cli_util.build_client('database', 'database', ctx) + result = client.update_basecc_vm_cluster( + basecc_vm_cluster_id=basecc_vm_cluster_id, + update_basecc_vm_cluster_details=_details, + **kwargs + ) + if wait_for_state: + + if hasattr(client, 'get_basecc_vm_cluster') and callable(getattr(client, 'get_basecc_vm_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_basecc_vm_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) + + @cloud_autonomous_vm_cluster_group.command(name=cli_util.override('db.update_cloud_autonomous_vm_cluster.command_name', 'update'), help=u"""Updates the specified Autonomous Exadata VM cluster in the Oracle cloud. For Exadata Cloud@Customer systems, see [UpdateAutonomousVmCluster]. \n[Command Reference](updateCloudAutonomousVmCluster)""") @cli_util.option('--cloud-autonomous-vm-cluster-id', required=True, help=u"""The Cloud VM cluster [OCID].""") @cli_util.option('--description', help=u"""User defined description of the cloud Autonomous VM cluster.""") diff --git a/services/database/tests/util/generated/command_to_api.py b/services/database/tests/util/generated/command_to_api.py index cd7c2a2cd..672cc53ff 100644 --- a/services/database/tests/util/generated/command_to_api.py +++ b/services/database/tests/util/generated/command_to_api.py @@ -20,6 +20,7 @@ "db.change_autonomous_exadata_infrastructure_compartment": "oci.database.DatabaseClient.change_autonomous_exadata_infrastructure_compartment", "db.change_autonomous_vm_cluster_compartment": "oci.database.DatabaseClient.change_autonomous_vm_cluster_compartment", "db.change_backup_destination_compartment": "oci.database.DatabaseClient.change_backup_destination_compartment", + "db.change_basecc_vm_cluster_compartment": "oci.database.DatabaseClient.change_basecc_vm_cluster_compartment", "db.change_cloud_autonomous_vm_cluster_compartment": "oci.database.DatabaseClient.change_cloud_autonomous_vm_cluster_compartment", "db.change_cloud_autonomous_vm_cluster_subscription": "oci.database.DatabaseClient.change_cloud_autonomous_vm_cluster_subscription", "db.change_cloud_db_system_subscription": "oci.database.DatabaseClient.change_cloud_db_system_subscription", @@ -68,6 +69,7 @@ "db.create_autonomous_vm_cluster": "oci.database.DatabaseClient.create_autonomous_vm_cluster", "db.create_backup": "oci.database.DatabaseClient.create_backup", "db.create_backup_destination": "oci.database.DatabaseClient.create_backup_destination", + "db.create_basecc_vm_cluster": "oci.database.DatabaseClient.create_basecc_vm_cluster", "db.create_cloud_autonomous_vm_cluster": "oci.database.DatabaseClient.create_cloud_autonomous_vm_cluster", "db.create_cloud_exadata_infrastructure": "oci.database.DatabaseClient.create_cloud_exadata_infrastructure", "db.create_cloud_vm_cluster": "oci.database.DatabaseClient.create_cloud_vm_cluster", @@ -107,6 +109,7 @@ "db.delete_autonomous_vm_cluster": "oci.database.DatabaseClient.delete_autonomous_vm_cluster", "db.delete_backup": "oci.database.DatabaseClient.delete_backup", "db.delete_backup_destination": "oci.database.DatabaseClient.delete_backup_destination", + "db.delete_basecc_vm_cluster": "oci.database.DatabaseClient.delete_basecc_vm_cluster", "db.delete_cloud_autonomous_vm_cluster": "oci.database.DatabaseClient.delete_cloud_autonomous_vm_cluster", "db.delete_cloud_exadata_infrastructure": "oci.database.DatabaseClient.delete_cloud_exadata_infrastructure", "db.delete_cloud_vm_cluster": "oci.database.DatabaseClient.delete_cloud_vm_cluster", @@ -192,6 +195,9 @@ "db.get_autonomous_vm_cluster_resource_usage": "oci.database.DatabaseClient.get_autonomous_vm_cluster_resource_usage", "db.get_backup": "oci.database.DatabaseClient.get_backup", "db.get_backup_destination": "oci.database.DatabaseClient.get_backup_destination", + "db.get_basecc_vm_cluster": "oci.database.DatabaseClient.get_basecc_vm_cluster", + "db.get_basecc_vm_cluster_update": "oci.database.DatabaseClient.get_basecc_vm_cluster_update", + "db.get_basecc_vm_cluster_update_history_entry": "oci.database.DatabaseClient.get_basecc_vm_cluster_update_history_entry", "db.get_cloud_autonomous_vm_cluster": "oci.database.DatabaseClient.get_cloud_autonomous_vm_cluster", "db.get_cloud_autonomous_vm_cluster_resource_usage": "oci.database.DatabaseClient.get_cloud_autonomous_vm_cluster_resource_usage", "db.get_cloud_exadata_infrastructure": "oci.database.DatabaseClient.get_cloud_exadata_infrastructure", @@ -278,6 +284,9 @@ "db.list_autonomous_vm_clusters": "oci.database.DatabaseClient.list_autonomous_vm_clusters", "db.list_backup_destination": "oci.database.DatabaseClient.list_backup_destination", "db.list_backups": "oci.database.DatabaseClient.list_backups", + "db.list_basecc_vm_cluster_update_history_entries": "oci.database.DatabaseClient.list_basecc_vm_cluster_update_history_entries", + "db.list_basecc_vm_cluster_updates": "oci.database.DatabaseClient.list_basecc_vm_cluster_updates", + "db.list_basecc_vm_clusters": "oci.database.DatabaseClient.list_basecc_vm_clusters", "db.list_cloud_autonomous_vm_cluster_acd_resource_usage": "oci.database.DatabaseClient.list_cloud_autonomous_vm_cluster_acd_resource_usage", "db.list_cloud_autonomous_vm_clusters": "oci.database.DatabaseClient.list_cloud_autonomous_vm_clusters", "db.list_cloud_exadata_infrastructures": "oci.database.DatabaseClient.list_cloud_exadata_infrastructures", @@ -360,6 +369,7 @@ "db.register_autonomous_database_data_safe": "oci.database.DatabaseClient.register_autonomous_database_data_safe", "db.register_cloud_autonomous_vm_cluster_pkcs": "oci.database.DatabaseClient.register_cloud_autonomous_vm_cluster_pkcs", "db.register_cloud_vm_cluster_pkcs": "oci.database.DatabaseClient.register_cloud_vm_cluster_pkcs", + "db.register_exadb_vm_cluster_pkcs": "oci.database.DatabaseClient.register_exadb_vm_cluster_pkcs", "db.reinstate_autonomous_container_database_dataguard": "oci.database.DatabaseClient.reinstate_autonomous_container_database_dataguard", "db.reinstate_autonomous_container_database_dataguard_association": "oci.database.DatabaseClient.reinstate_autonomous_container_database_dataguard_association", "db.reinstate_data_guard": "oci.database.DatabaseClient.reinstate_data_guard", @@ -411,6 +421,7 @@ "db.unmount_dbnode_snapshot": "oci.database.DatabaseClient.unmount_dbnode_snapshot", "db.unregister_cloud_autonomous_vm_cluster_pkcs": "oci.database.DatabaseClient.unregister_cloud_autonomous_vm_cluster_pkcs", "db.unregister_cloud_vm_cluster_pkcs": "oci.database.DatabaseClient.unregister_cloud_vm_cluster_pkcs", + "db.unregister_exadb_vm_cluster_pkcs": "oci.database.DatabaseClient.unregister_exadb_vm_cluster_pkcs", "db.update_advanced_cluster_file_system": "oci.database.DatabaseClient.update_advanced_cluster_file_system", "db.update_autonomous_container_database": "oci.database.DatabaseClient.update_autonomous_container_database", "db.update_autonomous_container_database_dataguard_association": "oci.database.DatabaseClient.update_autonomous_container_database_dataguard_association", @@ -423,6 +434,7 @@ "db.update_autonomous_vm_cluster": "oci.database.DatabaseClient.update_autonomous_vm_cluster", "db.update_backup": "oci.database.DatabaseClient.update_backup", "db.update_backup_destination": "oci.database.DatabaseClient.update_backup_destination", + "db.update_basecc_vm_cluster": "oci.database.DatabaseClient.update_basecc_vm_cluster", "db.update_cloud_autonomous_vm_cluster": "oci.database.DatabaseClient.update_cloud_autonomous_vm_cluster", "db.update_cloud_exadata_infrastructure": "oci.database.DatabaseClient.update_cloud_exadata_infrastructure", "db.update_cloud_vm_cluster": "oci.database.DatabaseClient.update_cloud_vm_cluster", 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 6df2d0211..f583461de 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 @@ -976,9 +976,9 @@ def create_api_key(ctx, from_json, wait_for_state, max_wait_seconds, wait_interv @cli_util.option('--unit-count', required=True, type=click.INT, help=u"""The number of dedicated units in this AI cluster.""") @cli_util.option('--unit-shape', required=True, help=u"""The shape of dedicated unit in this AI cluster. The underlying hardware configuration is hidden from customers. -Allowed values are: - LARGE_COHERE - LARGE_COHERE_V2 - SMALL_COHERE - SMALL_COHERE_V2 - SMALL_COHERE_4 - EMBED_COHERE - LLAMA2_70 - LARGE_GENERIC - LARGE_COHERE_V2_2 - LARGE_GENERIC_4 - SMALL_GENERIC_V2 - LARGE_GENERIC_2 - LARGE_GENERIC_V3 - LARGE_COHERE_V3 - RERANK_COHERE - SMALL_GENERIC_V1 - MEDIUM_GENERIC_V1 - LARGE_GENERIC_V1 - A10_X1 - A10_X2 - A10_X4 - A100_40G_X1 - A100_40G_X2 - A100_40G_X4 - A100_40G_X8 - A100_80G_X1 - A100_80G_X2 - A100_80G_X4 - A100_80G_X8 - H100_X1 - H100_X2 - H100_X4 - H100_X8 - H200_X1 - H200_X2 - H200_X4 - H200_X8 +Allowed values are: - LARGE_COHERE - LARGE_COHERE_V2 - SMALL_COHERE - SMALL_COHERE_V2 - SMALL_COHERE_4 - EMBED_COHERE - LLAMA2_70 - LARGE_GENERIC - LARGE_COHERE_V2_2 - LARGE_GENERIC_4 - SMALL_GENERIC_V2 - LARGE_GENERIC_2 - LARGE_GENERIC_V3 - LARGE_COHERE_V3 - RERANK_COHERE - SMALL_GENERIC_V1 - MEDIUM_GENERIC_V1 - LARGE_GENERIC_V1 - A10_X1 - A10_X2 - A10_X4 - A100_40G_X1 - A100_40G_X2 - A100_40G_X4 - A100_40G_X8 - A100_80G_X1 - A100_80G_X2 - A100_80G_X4 - A100_80G_X8 - H100_X1 - H100_X2 - H100_X4 - H100_X8 - H100_X16 - H100_X32 - H200_X1 - H200_X2 - H200_X4 - H200_X8 -The following shapes can only be used to deploy imported models: - A10_X1, A10_X2, A10_X4 - A100_40G_X1, A100_40G_X2, A100_40G_X4, A100_40G_X8 - A100_80G_X1, A100_80G_X2, A100_80G_X4, A100_80G_X8 - H100_X1, H100_X2, H100_X4, H100_X8 - H200_X1, H200_X2, H200_X4, H200_X8 - OAI_A10_X2 - OAI_H100_X1 - OAI_H100_X2 - OAI_H200_X1 - OAI_A100_80G_X1 - OAI_A100_80G_X2 - OAI_A100_40G_X1 - OAI_A100_40G_X4 - B200_X1 - B200_X2 - B200_X4 - B200_X8 - OAI_B200_X1 - OAI_B200_X2 - OAI_B200_X4 - OAI_B200_X8 - SB_B200_X1""") +The following shapes can only be used to deploy imported models: - A10_X1, A10_X2, A10_X4 - A100_40G_X1, A100_40G_X2, A100_40G_X4, A100_40G_X8 - A100_80G_X1, A100_80G_X2, A100_80G_X4, A100_80G_X8 - H100_X1, H100_X2, H100_X4, H100_X8 - H100_X16, H100_X32 - H200_X1, H200_X2, H200_X4, H200_X8 - OAI_A10_X2 - OAI_H100_X1 - OAI_H100_X2 - OAI_H200_X1 - OAI_A100_80G_X1 - OAI_A100_80G_X2 - OAI_A100_40G_X1 - OAI_A100_40G_X4 - B200_X1 - B200_X2 - B200_X4 - B200_X8 - OAI_B200_X1 - OAI_B200_X2 - OAI_B200_X4 - OAI_B200_X8 - SB_B200_X1""") @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 dedicated AI cluster.""") @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]. diff --git a/setup.py b/setup.py index 36d865b24..52dc9ddb7 100644 --- a/setup.py +++ b/setup.py @@ -30,7 +30,7 @@ def open_relative(*path): readme = f.read() requires = [ - 'oci==2.182.1', + 'oci==2.183.0', 'arrow>=1.0.0,<2.0.0', 'certifi>=2025.1.31,<2026.0.0', 'click<=8.1.2', diff --git a/src/oci_cli/version.py b/src/oci_cli/version.py index 7c74bff1f..172d09f00 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.3' +__version__ = '3.90.0'