From 343cc08860a6f55b6da8ace6b6edc9729673c0cb Mon Sep 17 00:00:00 2001 From: OCI DEX Release Bot Automation Date: Tue, 21 Apr 2026 06:50:23 +0000 Subject: [PATCH] Releasing version 3.80.0 Co-authored-by: Harsh Kumar --- CHANGELOG.rst | 73 +- requirements.txt | 2 +- .../oci_cli_compute/generated/compute_cli.py | 296 ++-- .../generated/virtualnetwork_cli.py | 48 +- .../generated/database_cli.py | 70 +- .../generated/functionsmanagement_cli.py | 24 +- .../generated/fusionapplications_cli.py | 1523 ++++++++++++++++- .../tests/util/generated/command_to_api.py | 23 + .../generated/goldengate_cli.py | 318 +++- .../tests/util/generated/command_to_api.py | 1 + .../generated/loggingmanagement_cli.py | 19 +- .../oci_cli_logging/generated/logging_cli.py | 4 +- .../generated/logsearch_cli.py | 10 +- .../generated/usageapi_cli.py | 2 +- setup.py | 2 +- src/oci_cli/version.py | 2 +- 16 files changed, 2080 insertions(+), 337 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index c3a4ffb0..07af94a6 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -6,7 +6,78 @@ All notable changes to this project will be documented in this file. The format is based on `Keep a Changelog `__. -3.79.0 - 2026-04-09 +3.80.0 - 2026-04-21 +------------------- +Added +~~~~~ +* Database service + + * Support for ASM Diskgroup Resize for CloudVmCluster in the Exadata Database Service on Dedicated Infrastructure + + * ``oci db cloud-vm-cluster create --reco-storage-percentage --sparse-storage-percentage`` + * ``oci db cloud-vm-cluster update --data-storage-percentage --is-local-backup-enabled --is-sparse-diskgroup-enabled --reco-storage-percentage --sparse-storage-percentage`` + + * Support for ASM Diskgroup Resize for VmCluster in the Exadata Database Service on Cloud@Customer + + * ``oci db vm-cluster create --data-storage-percentage --reco-storage-percentage --sparse-storage-percentage`` + * ``oci db vm-cluster update --data-storage-percentage --is-local-backup-enabled --is-sparse-diskgroup-enabled --reco-storage-percentage --sparse-storage-percentage`` + + * Fusion Applications service + + * Support for Email Subdomain, Marketing Brand, and Microsite commands + + * ``oci fusion-apps email-subdomain`` + * ``oci fusion-apps marketing-brand`` + * ``oci fusion-apps microsite`` + + * GoldenGate service + + * Support for new technology types + + * ``oci goldengate connection create-kafka-connection --technology-type MICROSOFT_FABRIC_EVENTSTREAM`` + * ``oci goldengate connection create-postgresql-connection --technology-type EDB_POSTGRES_ADVANCED_SERVER`` + * ``oci goldengate connection create-postgresql-connection --technology-type YUGABYTE_DB`` + + * Support for new optional endpoint parameter for Google BigQuery connections + + * ``oci goldengate connection create-google-big-query-connection --endpoint-parameterconflict`` + * ``oci goldengate connection update-google-big-query-connection --endpoint-parameterconflict`` + + * Support for new optional endpoint parameter for Google Cloud Storage connections + + * ``oci goldengate connection create-google-cloud-storage-connection --endpoint-parameterconflict`` + * ``oci goldengate connection update-google-cloud-storage-connection --endpoint-parameterconflict`` + + * Support for migrating Connection Secret details + * ``oci goldengate connection migrate`` + * ``oci goldengate connection migrate-connection-secret-migrate-connection-details`` + + * Functions service + + * Support for Application logging configuration + + * ``oci fn application create --logging`` + * ``oci fn application update --logging`` + + * Usage service + + * Support for ``USAGE_ONLY`` queryType + + * ``oci usage-api usage-summary request-summarized-usages --query-type USAGE_ONLY`` + + * Compute GPU Memory Cluster service + + * Support for Reserved Private IP Ids + + * ``oci compute compute-gpu-memory-cluster create --private-ip-ids`` + * ``oci compute compute-gpu-memory-cluster update --private-ip-ids`` + +Changed +~~~~~~~ + - [BREAKING] GoldenGate service: --private-ip is no longer supported for connection creation commands + + +3.79.0 - 2026-04-14 ------------------- Added ~~~~~ diff --git a/requirements.txt b/requirements.txt index c7fc2fdc..83a43c30 100644 --- a/requirements.txt +++ b/requirements.txt @@ -15,7 +15,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.171.0 +oci==2.172.0 packaging>=22.0,<25.0; python_version > '3.8' packaging==20.2; python_version <= '3.8' pluggy==0.13.0 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 167aafed..91926b4d 100644 --- a/services/core/src/oci_cli_compute/generated/compute_cli.py +++ b/services/core/src/oci_cli_compute/generated/compute_cli.py @@ -84,7 +84,7 @@ def instance_maintenance_event_group(): pass -@click.command(cli_util.override('compute.compute_gpu_memory_cluster_group.command_name', 'compute-gpu-memory-cluster'), cls=CommandGroupWithAlias, help="""The customer facing object includes GPU memory cluster details.""") +@click.command(cli_util.override('compute.compute_gpu_memory_cluster_group.command_name', 'compute-gpu-memory-cluster'), cls=CommandGroupWithAlias, help="""The customer facing object includes GPU Memory Cluster details.""") @cli_util.help_option_group def compute_gpu_memory_cluster_group(): pass @@ -110,7 +110,7 @@ def instance_credentials_group(): pass -@click.command(cli_util.override('compute.compute_gpu_memory_cluster_instance_summary_group.command_name', 'compute-gpu-memory-cluster-instance-summary'), cls=CommandGroupWithAlias, help="""The customer facing GPU memory cluster instance object details.""") +@click.command(cli_util.override('compute.compute_gpu_memory_cluster_instance_summary_group.command_name', 'compute-gpu-memory-cluster-instance-summary'), cls=CommandGroupWithAlias, help="""The customer facing GPU Memory Cluster instance object details.""") @cli_util.help_option_group def compute_gpu_memory_cluster_instance_summary_group(): pass @@ -432,12 +432,15 @@ def add_image_shape_compatibility_entry(ctx, from_json, force, image_id, shape_n @compute_host_group.command(name=cli_util.override('compute.apply_host_configuration.command_name', 'apply-host-configuration'), help=u"""Triggers the asynchronous process that applies the host's target configuration \n[Command Reference](applyHostConfiguration)""") @cli_util.option('--compute-host-id', required=True, help=u"""The [OCID] of the compute host.""") @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(["AVAILABLE", "OCCUPIED", "PROVISIONING", "REPAIR", "UNAVAILABLE"]), 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 AVAILABLE --wait-for-state UNAVAILABLE would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.""") +@cli_util.option('--max-wait-seconds', type=click.INT, help="""The maximum time to wait for the resource to reach the lifecycle state defined by --wait-for-state. Defaults to 1200 seconds.""") +@cli_util.option('--wait-interval-seconds', type=click.INT, help="""Check every --wait-interval-seconds to see whether the resource has reached the lifecycle state defined by --wait-for-state. Defaults to 30 seconds.""") @json_skeleton_utils.get_cli_json_input_option({}) @cli_util.help_option @click.pass_context @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'core', 'class': 'ComputeHost'}) @cli_util.wrap_exceptions -def apply_host_configuration(ctx, from_json, compute_host_id, if_match): +def apply_host_configuration(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, compute_host_id, if_match): if isinstance(compute_host_id, six.string_types) and len(compute_host_id.strip()) == 0: raise click.UsageError('Parameter --compute-host-id cannot be whitespace or empty string') @@ -451,6 +454,29 @@ def apply_host_configuration(ctx, from_json, compute_host_id, if_match): compute_host_id=compute_host_id, **kwargs ) + if wait_for_state: + + if hasattr(client, 'get_compute_host') and callable(getattr(client, 'get_compute_host')): + try: + wait_period_kwargs = {} + if max_wait_seconds is not None: + wait_period_kwargs['max_wait_seconds'] = max_wait_seconds + if wait_interval_seconds is not None: + wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds + + click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr) + result = oci.wait_until(client, client.get_compute_host(result.data.id), 'lifecycle_state', wait_for_state, **wait_period_kwargs) + except oci.exceptions.MaximumWaitTimeExceeded as e: + # If we fail, we should show an error, but we should still provide the information to the customer + click.echo('Failed to wait until the resource entered the specified state. Outputting last known resource state', file=sys.stderr) + cli_util.render_response(result, ctx) + sys.exit(2) + except Exception: + click.echo('Encountered error while waiting for resource to enter the specified state. Outputting last known resource state', file=sys.stderr) + cli_util.render_response(result, ctx) + raise + else: + click.echo('Unable to wait for the resource to enter the specified state', file=sys.stderr) cli_util.render_response(result, ctx) @@ -516,12 +542,15 @@ def attach_boot_volume(ctx, from_json, wait_for_state, max_wait_seconds, wait_in @cli_util.option('--compute-host-id', required=True, help=u"""The [OCID] of the compute host.""") @cli_util.option('--compute-host-group-id', required=True, help=u"""'The [OCID] of the compute host group.'""") @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(["AVAILABLE", "OCCUPIED", "PROVISIONING", "REPAIR", "UNAVAILABLE"]), 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 AVAILABLE --wait-for-state UNAVAILABLE would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.""") +@cli_util.option('--max-wait-seconds', type=click.INT, help="""The maximum time to wait for the resource to reach the lifecycle state defined by --wait-for-state. Defaults to 1200 seconds.""") +@cli_util.option('--wait-interval-seconds', type=click.INT, help="""Check every --wait-interval-seconds to see whether the resource has reached the lifecycle state defined by --wait-for-state. Defaults to 30 seconds.""") @json_skeleton_utils.get_cli_json_input_option({}) @cli_util.help_option @click.pass_context @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'core', 'class': 'ComputeHost'}) @cli_util.wrap_exceptions -def attach_compute_host_group_host(ctx, from_json, compute_host_id, compute_host_group_id, if_match): +def attach_compute_host_group_host(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, compute_host_id, compute_host_group_id, if_match): if isinstance(compute_host_id, six.string_types) and len(compute_host_id.strip()) == 0: raise click.UsageError('Parameter --compute-host-id cannot be whitespace or empty string') @@ -540,6 +569,29 @@ def attach_compute_host_group_host(ctx, from_json, compute_host_id, compute_host attach_compute_host_group_host_details=_details, **kwargs ) + if wait_for_state: + + if hasattr(client, 'get_compute_host') and callable(getattr(client, 'get_compute_host')): + try: + wait_period_kwargs = {} + if max_wait_seconds is not None: + wait_period_kwargs['max_wait_seconds'] = max_wait_seconds + if wait_interval_seconds is not None: + wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds + + click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr) + result = oci.wait_until(client, client.get_compute_host(result.data.id), 'lifecycle_state', wait_for_state, **wait_period_kwargs) + except oci.exceptions.MaximumWaitTimeExceeded as e: + # If we fail, we should show an error, but we should still provide the information to the customer + click.echo('Failed to wait until the resource entered the specified state. Outputting last known resource state', file=sys.stderr) + cli_util.render_response(result, ctx) + sys.exit(2) + except Exception: + click.echo('Encountered error while waiting for resource to enter the specified state. Outputting last known resource state', file=sys.stderr) + cli_util.render_response(result, ctx) + raise + else: + click.echo('Unable to wait for the resource to enter the specified state', file=sys.stderr) cli_util.render_response(result, ctx) @@ -1601,12 +1653,15 @@ def change_instance_compartment(ctx, from_json, wait_for_state, max_wait_seconds @compute_host_group.command(name=cli_util.override('compute.check_host_configuration.command_name', 'check-host-configuration'), help=u"""Marks the host to be checked for conformance to its target configuration \n[Command Reference](checkHostConfiguration)""") @cli_util.option('--compute-host-id', required=True, help=u"""The [OCID] of the compute host.""") @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(["AVAILABLE", "OCCUPIED", "PROVISIONING", "REPAIR", "UNAVAILABLE"]), 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 AVAILABLE --wait-for-state UNAVAILABLE would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.""") +@cli_util.option('--max-wait-seconds', type=click.INT, help="""The maximum time to wait for the resource to reach the lifecycle state defined by --wait-for-state. Defaults to 1200 seconds.""") +@cli_util.option('--wait-interval-seconds', type=click.INT, help="""Check every --wait-interval-seconds to see whether the resource has reached the lifecycle state defined by --wait-for-state. Defaults to 30 seconds.""") @json_skeleton_utils.get_cli_json_input_option({}) @cli_util.help_option @click.pass_context @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'core', 'class': 'ComputeHost'}) @cli_util.wrap_exceptions -def check_host_configuration(ctx, from_json, compute_host_id, if_match): +def check_host_configuration(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, compute_host_id, if_match): if isinstance(compute_host_id, six.string_types) and len(compute_host_id.strip()) == 0: raise click.UsageError('Parameter --compute-host-id cannot be whitespace or empty string') @@ -1620,6 +1675,29 @@ def check_host_configuration(ctx, from_json, compute_host_id, if_match): compute_host_id=compute_host_id, **kwargs ) + if wait_for_state: + + if hasattr(client, 'get_compute_host') and callable(getattr(client, 'get_compute_host')): + try: + wait_period_kwargs = {} + if max_wait_seconds is not None: + wait_period_kwargs['max_wait_seconds'] = max_wait_seconds + if wait_interval_seconds is not None: + wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds + + click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr) + result = oci.wait_until(client, client.get_compute_host(result.data.id), 'lifecycle_state', wait_for_state, **wait_period_kwargs) + except oci.exceptions.MaximumWaitTimeExceeded as e: + # If we fail, we should show an error, but we should still provide the information to the customer + click.echo('Failed to wait until the resource entered the specified state. Outputting last known resource state', file=sys.stderr) + cli_util.render_response(result, ctx) + sys.exit(2) + except Exception: + click.echo('Encountered error while waiting for resource to enter the specified state. Outputting last known resource state', file=sys.stderr) + cli_util.render_response(result, ctx) + raise + else: + click.echo('Unable to wait for the resource to enter the specified state', file=sys.stderr) cli_util.render_response(result, ctx) @@ -2002,12 +2080,12 @@ def create_compute_cluster(ctx, from_json, wait_for_state, max_wait_seconds, wai @compute_gpu_memory_cluster_group.command(name=cli_util.override('compute.create_compute_gpu_memory_cluster.command_name', 'create'), help=u"""Create a compute GPU memory cluster instance on a specific compute GPU memory fabric \n[Command Reference](createComputeGpuMemoryCluster)""") -@cli_util.option('--availability-domain', required=True, help=u"""The availability domain of the GPU memory cluster.""") -@cli_util.option('--compartment-id', required=True, help=u"""The [OCID] of the compartment that contains the compute GPU memory cluster. compartment.""") +@cli_util.option('--availability-domain', required=True, help=u"""The availability domain of the GPU Memory Cluster.""") +@cli_util.option('--compartment-id', required=True, help=u"""The [OCID] of the compartment that contains the compute GPU Memory Cluster. compartment.""") @cli_util.option('--compute-cluster-id', required=True, help=u"""The [OCID] of the compute cluster.""") @cli_util.option('--instance-configuration-id', required=True, help=u"""Instance Configuration to be used for this GPU Memory Cluster""") @cli_util.option('--gpu-memory-fabric-id', help=u"""The [OCID] of the GPU memory fabric.""") -@cli_util.option('--size', type=click.INT, help=u"""The number of instances currently running in the GpuMemoryCluster""") +@cli_util.option('--size', type=click.INT, help=u"""The desired number of instances for the GPU Memory Cluster.""") @cli_util.option('--defined-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags]. Example: `{\"Operations\": {\"CostCenter\": \"42\"}}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP) @@ -2016,15 +2094,16 @@ def create_compute_cluster(ctx, from_json, wait_for_state, max_wait_seconds, wai Example: `{\"Department\": \"Finance\"}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP) @cli_util.option('--display-name', help=u"""A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.""") @cli_util.option('--gpu-memory-cluster-scale-config', type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP) +@cli_util.option('--private-ip-ids', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Unique list of OCIDs for private IPs (IPv4/IPv6) associated with the GPU Memory Cluster""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP) @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED"]), multiple=True, help="""This operation creates, modifies or deletes a resource that has a defined lifecycle state. Specify this option to perform the action and then wait until the resource reaches a given lifecycle state. Multiple states can be specified, returning on the first state. For example, --wait-for-state CREATING --wait-for-state DELETED would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.""") @cli_util.option('--max-wait-seconds', type=click.INT, help="""The maximum time to wait for the resource to reach the lifecycle state defined by --wait-for-state. Defaults to 1200 seconds.""") @cli_util.option('--wait-interval-seconds', type=click.INT, help="""Check every --wait-interval-seconds to see whether the resource has reached the lifecycle state defined by --wait-for-state. Defaults to 30 seconds.""") -@json_skeleton_utils.get_cli_json_input_option({'defined-tags': {'module': 'core', 'class': 'dict(str, dict(str, object))'}, 'freeform-tags': {'module': 'core', 'class': 'dict(str, string)'}, 'gpu-memory-cluster-scale-config': {'module': 'core', 'class': 'CreateComputeGpuMemoryClusterScaleConfig'}}) +@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)'}, 'gpu-memory-cluster-scale-config': {'module': 'core', 'class': 'CreateComputeGpuMemoryClusterScaleConfig'}, 'private-ip-ids': {'module': 'core', 'class': 'list[string]'}}) @cli_util.help_option @click.pass_context -@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'defined-tags': {'module': 'core', 'class': 'dict(str, dict(str, object))'}, 'freeform-tags': {'module': 'core', 'class': 'dict(str, string)'}, 'gpu-memory-cluster-scale-config': {'module': 'core', 'class': 'CreateComputeGpuMemoryClusterScaleConfig'}}, output_type={'module': 'core', 'class': 'ComputeGpuMemoryCluster'}) +@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)'}, 'gpu-memory-cluster-scale-config': {'module': 'core', 'class': 'CreateComputeGpuMemoryClusterScaleConfig'}, 'private-ip-ids': {'module': 'core', 'class': 'list[string]'}}, output_type={'module': 'core', 'class': 'ComputeGpuMemoryCluster'}) @cli_util.wrap_exceptions -def create_compute_gpu_memory_cluster(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, availability_domain, compartment_id, compute_cluster_id, instance_configuration_id, gpu_memory_fabric_id, size, defined_tags, freeform_tags, display_name, gpu_memory_cluster_scale_config): +def create_compute_gpu_memory_cluster(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, availability_domain, compartment_id, compute_cluster_id, instance_configuration_id, gpu_memory_fabric_id, size, defined_tags, freeform_tags, display_name, gpu_memory_cluster_scale_config, private_ip_ids): kwargs = {} kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id']) @@ -2053,6 +2132,9 @@ def create_compute_gpu_memory_cluster(ctx, from_json, wait_for_state, max_wait_s if gpu_memory_cluster_scale_config is not None: _details['gpuMemoryClusterScaleConfig'] = cli_util.parse_json_parameter("gpu_memory_cluster_scale_config", gpu_memory_cluster_scale_config) + if private_ip_ids is not None: + _details['privateIpIds'] = cli_util.parse_json_parameter("private_ip_ids", private_ip_ids) + client = cli_util.build_client('core', 'compute', ctx) result = client.create_compute_gpu_memory_cluster( create_compute_gpu_memory_cluster_details=_details, @@ -4239,45 +4321,45 @@ def get_compute_gpu_memory_fabric(ctx, from_json, compute_gpu_memory_fabric_id): cli_util.render_response(result, ctx) -@compute_host_group_group.command(name=cli_util.override('compute.get_compute_host_group.command_name', 'get'), help=u"""Gets information about the specified compute host group \n[Command Reference](getComputeHostGroup)""") -@cli_util.option('--compute-host-group-id', required=True, help=u"""The [OCID] of the compute host group.""") +@compute_host_group.command(name=cli_util.override('compute.get_compute_host.command_name', 'get'), help=u"""Gets information about the specified compute host \n[Command Reference](getComputeHost)""") +@cli_util.option('--compute-host-id', required=True, help=u"""The [OCID] of the compute host.""") @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': 'ComputeHostGroup'}) +@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'core', 'class': 'ComputeHost'}) @cli_util.wrap_exceptions -def get_compute_host_group(ctx, from_json, compute_host_group_id): +def get_compute_host(ctx, from_json, compute_host_id): - if isinstance(compute_host_group_id, six.string_types) and len(compute_host_group_id.strip()) == 0: - raise click.UsageError('Parameter --compute-host-group-id cannot be whitespace or empty string') + if isinstance(compute_host_id, six.string_types) and len(compute_host_id.strip()) == 0: + raise click.UsageError('Parameter --compute-host-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('core', 'compute', ctx) - result = client.get_compute_host_group( - compute_host_group_id=compute_host_group_id, + result = client.get_compute_host( + compute_host_id=compute_host_id, **kwargs ) cli_util.render_response(result, ctx) -@compute_host_group.command(name=cli_util.override('compute.get_compute_hosts.command_name', 'get'), help=u"""Gets information about the specified compute host \n[Command Reference](getComputeHosts)""") -@cli_util.option('--compute-host-id', required=True, help=u"""The [OCID] of the compute host.""") +@compute_host_group_group.command(name=cli_util.override('compute.get_compute_host_group.command_name', 'get'), help=u"""Gets information about the specified compute host group \n[Command Reference](getComputeHostGroup)""") +@cli_util.option('--compute-host-group-id', required=True, help=u"""The [OCID] of the compute host group.""") @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': 'ComputeHost'}) +@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'core', 'class': 'ComputeHostGroup'}) @cli_util.wrap_exceptions -def get_compute_hosts(ctx, from_json, compute_host_id): +def get_compute_host_group(ctx, from_json, compute_host_group_id): - if isinstance(compute_host_id, six.string_types) and len(compute_host_id.strip()) == 0: - raise click.UsageError('Parameter --compute-host-id cannot be whitespace or empty string') + if isinstance(compute_host_group_id, six.string_types) and len(compute_host_group_id.strip()) == 0: + raise click.UsageError('Parameter --compute-host-group-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('core', 'compute', ctx) - result = client.get_compute_hosts( - compute_host_id=compute_host_id, + result = client.get_compute_host_group( + compute_host_group_id=compute_host_group_id, **kwargs ) cli_util.render_response(result, ctx) @@ -11697,7 +11779,7 @@ def update_compute_cluster(ctx, from_json, force, wait_for_state, max_wait_secon @compute_gpu_memory_cluster_group.command(name=cli_util.override('compute.update_compute_gpu_memory_cluster.command_name', 'update'), help=u"""Updates a compute gpu memory cluster resource. \n[Command Reference](updateComputeGpuMemoryCluster)""") @cli_util.option('--compute-gpu-memory-cluster-id', required=True, help=u"""The OCID of the compute GPU memory cluster.""") @cli_util.option('--instance-configuration-id', help=u"""Instance Configuration to be used for this GPU Memory Cluster""") -@cli_util.option('--size', type=click.INT, help=u"""The number of instances currently running in the GpuMemoryCluster""") +@cli_util.option('--size', type=click.INT, help=u"""The desired number of instances for the GPU Memory Cluster.""") @cli_util.option('--defined-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags]. Example: `{\"Operations\": {\"CostCenter\": \"42\"}}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP) @@ -11706,23 +11788,24 @@ def update_compute_cluster(ctx, from_json, force, wait_for_state, max_wait_secon Example: `{\"Department\": \"Finance\"}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP) @cli_util.option('--display-name', help=u"""A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.""") @cli_util.option('--gpu-memory-cluster-scale-config', type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP) +@cli_util.option('--private-ip-ids', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Unique list of OCIDs for private IPs (IPv4/IPv6) associated with the GPU Memory Cluster""" + 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(["CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED"]), multiple=True, help="""This operation creates, modifies or deletes a resource that has a defined lifecycle state. Specify this option to perform the action and then wait until the resource reaches a given lifecycle state. Multiple states can be specified, returning on the first state. For example, --wait-for-state CREATING --wait-for-state DELETED would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.""") @cli_util.option('--max-wait-seconds', type=click.INT, help="""The maximum time to wait for the resource to reach the lifecycle state defined by --wait-for-state. Defaults to 1200 seconds.""") @cli_util.option('--wait-interval-seconds', type=click.INT, help="""Check every --wait-interval-seconds to see whether the resource has reached the lifecycle state defined by --wait-for-state. Defaults to 30 seconds.""") -@json_skeleton_utils.get_cli_json_input_option({'defined-tags': {'module': 'core', 'class': 'dict(str, dict(str, object))'}, 'freeform-tags': {'module': 'core', 'class': 'dict(str, string)'}, 'gpu-memory-cluster-scale-config': {'module': 'core', 'class': 'UpdateComputeGpuMemoryClusterScaleConfig'}}) +@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)'}, 'gpu-memory-cluster-scale-config': {'module': 'core', 'class': 'UpdateComputeGpuMemoryClusterScaleConfig'}, 'private-ip-ids': {'module': 'core', 'class': 'list[string]'}}) @cli_util.help_option @click.pass_context -@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'defined-tags': {'module': 'core', 'class': 'dict(str, dict(str, object))'}, 'freeform-tags': {'module': 'core', 'class': 'dict(str, string)'}, 'gpu-memory-cluster-scale-config': {'module': 'core', 'class': 'UpdateComputeGpuMemoryClusterScaleConfig'}}, output_type={'module': 'core', 'class': 'ComputeGpuMemoryCluster'}) +@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)'}, 'gpu-memory-cluster-scale-config': {'module': 'core', 'class': 'UpdateComputeGpuMemoryClusterScaleConfig'}, 'private-ip-ids': {'module': 'core', 'class': 'list[string]'}}, output_type={'module': 'core', 'class': 'ComputeGpuMemoryCluster'}) @cli_util.wrap_exceptions -def update_compute_gpu_memory_cluster(ctx, from_json, force, wait_for_state, max_wait_seconds, wait_interval_seconds, compute_gpu_memory_cluster_id, instance_configuration_id, size, defined_tags, freeform_tags, display_name, gpu_memory_cluster_scale_config, if_match): +def update_compute_gpu_memory_cluster(ctx, from_json, force, wait_for_state, max_wait_seconds, wait_interval_seconds, compute_gpu_memory_cluster_id, instance_configuration_id, size, defined_tags, freeform_tags, display_name, gpu_memory_cluster_scale_config, private_ip_ids, if_match): if isinstance(compute_gpu_memory_cluster_id, six.string_types) and len(compute_gpu_memory_cluster_id.strip()) == 0: raise click.UsageError('Parameter --compute-gpu-memory-cluster-id cannot be whitespace or empty string') if not force: - if defined_tags or freeform_tags or gpu_memory_cluster_scale_config: - if not click.confirm("WARNING: Updates to defined-tags and freeform-tags and gpu-memory-cluster-scale-config will replace any existing values. Are you sure you want to continue?"): + if defined_tags or freeform_tags or gpu_memory_cluster_scale_config or private_ip_ids: + if not click.confirm("WARNING: Updates to defined-tags and freeform-tags and gpu-memory-cluster-scale-config and private-ip-ids will replace any existing values. Are you sure you want to continue?"): ctx.abort() kwargs = {} @@ -11750,6 +11833,9 @@ def update_compute_gpu_memory_cluster(ctx, from_json, force, wait_for_state, max if gpu_memory_cluster_scale_config is not None: _details['gpuMemoryClusterScaleConfig'] = cli_util.parse_json_parameter("gpu_memory_cluster_scale_config", gpu_memory_cluster_scale_config) + if private_ip_ids is not None: + _details['privateIpIds'] = cli_util.parse_json_parameter("private_ip_ids", private_ip_ids) + client = cli_util.build_client('core', 'compute', ctx) result = client.update_compute_gpu_memory_cluster( compute_gpu_memory_cluster_id=compute_gpu_memory_cluster_id, @@ -11862,36 +11948,32 @@ def update_compute_gpu_memory_fabric(ctx, from_json, force, wait_for_state, max_ cli_util.render_response(result, ctx) -@compute_host_group_group.command(name=cli_util.override('compute.update_compute_host_group.command_name', 'update'), help=u"""Updates the specified compute host group details. \n[Command Reference](updateComputeHostGroup)""") -@cli_util.option('--compute-host-group-id', required=True, help=u"""The [OCID] of the compute host group.""") -@cli_util.option('--display-name', help=u"""A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.""") -@cli_util.option('--configurations', type=custom_types.CLI_COMPLEX_TYPE, help=u"""A list of HostGroupConfiguration objects - -This option is a JSON list with items of type HostGroupConfiguration. For documentation on HostGroupConfiguration please see our API reference: https://docs.oracle.com/en-us/iaas/api/#/en/iaas/20160918/datatypes/HostGroupConfiguration.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP) -@cli_util.option('--is-targeted-placement-required', type=click.BOOL, help=u"""A flag that allows customers to restrict placement for hosts attached to the group. If true, the only way to place on hosts is to target the specific host group.""") +@compute_host_group.command(name=cli_util.override('compute.update_compute_host.command_name', 'update'), help=u"""Customer can update the some fields for ComputeHost record \n[Command Reference](updateComputeHost)""") +@cli_util.option('--compute-host-id', required=True, help=u"""The [OCID] of the compute host.""") @cli_util.option('--defined-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags]. Example: `{\"Operations\": {\"CostCenter\": \"42\"}}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP) +@cli_util.option('--display-name', help=u"""A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.""") @cli_util.option('--freeform-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags]. Example: `{\"Department\": \"Finance\"}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP) @cli_util.option('--if-match', help=u"""For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.""") @cli_util.option('--force', help="""Perform update without prompting for confirmation.""", is_flag=True) -@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACTIVE", "DELETED"]), multiple=True, help="""This operation creates, modifies or deletes a resource that has a defined lifecycle state. Specify this option to perform the action and then wait until the resource reaches a given lifecycle state. Multiple states can be specified, returning on the first state. For example, --wait-for-state ACTIVE --wait-for-state DELETED would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.""") -@cli_util.option('--max-wait-seconds', type=click.INT, help="""The maximum time to wait for the resource to reach the lifecycle state defined by --wait-for-state. Defaults to 1200 seconds.""") -@cli_util.option('--wait-interval-seconds', type=click.INT, help="""Check every --wait-interval-seconds to see whether the resource has reached the lifecycle state defined by --wait-for-state. Defaults to 30 seconds.""") -@json_skeleton_utils.get_cli_json_input_option({'configurations': {'module': 'core', 'class': 'list[HostGroupConfiguration]'}, 'defined-tags': {'module': 'core', 'class': 'dict(str, dict(str, object))'}, 'freeform-tags': {'module': 'core', 'class': 'dict(str, string)'}}) +@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({'defined-tags': {'module': 'core', 'class': 'dict(str, dict(str, object))'}, 'freeform-tags': {'module': 'core', 'class': 'dict(str, string)'}}) @cli_util.help_option @click.pass_context -@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'configurations': {'module': 'core', 'class': 'list[HostGroupConfiguration]'}, 'defined-tags': {'module': 'core', 'class': 'dict(str, dict(str, object))'}, 'freeform-tags': {'module': 'core', 'class': 'dict(str, string)'}}, output_type={'module': 'core', 'class': 'ComputeHostGroup'}) +@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)'}}) @cli_util.wrap_exceptions -def update_compute_host_group(ctx, from_json, force, wait_for_state, max_wait_seconds, wait_interval_seconds, compute_host_group_id, display_name, configurations, is_targeted_placement_required, defined_tags, freeform_tags, if_match): +def update_compute_host(ctx, from_json, force, wait_for_state, max_wait_seconds, wait_interval_seconds, compute_host_id, defined_tags, display_name, freeform_tags, if_match): - if isinstance(compute_host_group_id, six.string_types) and len(compute_host_group_id.strip()) == 0: - raise click.UsageError('Parameter --compute-host-group-id cannot be whitespace or empty string') + if isinstance(compute_host_id, six.string_types) and len(compute_host_id.strip()) == 0: + raise click.UsageError('Parameter --compute-host-id cannot be whitespace or empty string') if not force: - if configurations or defined_tags or freeform_tags: - if not click.confirm("WARNING: Updates to configurations and defined-tags and freeform-tags will replace any existing values. Are you sure you want to continue?"): + if defined_tags or freeform_tags: + if not click.confirm("WARNING: Updates to defined-tags and freeform-tags will replace any existing values. Are you sure you want to continue?"): ctx.abort() kwargs = {} @@ -11901,79 +11983,89 @@ def update_compute_host_group(ctx, from_json, force, wait_for_state, max_wait_se _details = {} - if display_name is not None: - _details['displayName'] = display_name - - if configurations is not None: - _details['configurations'] = cli_util.parse_json_parameter("configurations", configurations) - - if is_targeted_placement_required is not None: - _details['isTargetedPlacementRequired'] = is_targeted_placement_required - if defined_tags is not None: _details['definedTags'] = cli_util.parse_json_parameter("defined_tags", defined_tags) + if display_name is not None: + _details['displayName'] = display_name + if freeform_tags is not None: _details['freeformTags'] = cli_util.parse_json_parameter("freeform_tags", freeform_tags) client = cli_util.build_client('core', 'compute', ctx) - result = client.update_compute_host_group( - compute_host_group_id=compute_host_group_id, - update_compute_host_group_details=_details, + result = client.update_compute_host( + compute_host_id=compute_host_id, + update_compute_host_details=_details, **kwargs ) + work_request_client = cli_util.build_client('work_requests', 'work_request', ctx) if wait_for_state: - if hasattr(client, 'get_compute_host_group') and callable(getattr(client, 'get_compute_host_group')): + 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) - click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr) - result = oci.wait_until(client, client.get_compute_host_group(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) + 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 resource to enter the specified state. Outputting last known resource state', file=sys.stderr) + 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 resource to enter the specified state', file=sys.stderr) + click.echo('Unable to wait for the work request to enter the specified state', file=sys.stderr) cli_util.render_response(result, ctx) -@compute_host_group.command(name=cli_util.override('compute.update_compute_hosts.command_name', 'update'), help=u"""Customer can update the some fields for ComputeHost record \n[Command Reference](updateComputeHosts)""") -@cli_util.option('--compute-host-id', required=True, help=u"""The [OCID] of the compute host.""") +@compute_host_group_group.command(name=cli_util.override('compute.update_compute_host_group.command_name', 'update'), help=u"""Updates the specified compute host group details. \n[Command Reference](updateComputeHostGroup)""") +@cli_util.option('--compute-host-group-id', required=True, help=u"""The [OCID] of the compute host group.""") +@cli_util.option('--display-name', help=u"""A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.""") +@cli_util.option('--configurations', type=custom_types.CLI_COMPLEX_TYPE, help=u"""A list of HostGroupConfiguration objects + +This option is a JSON list with items of type HostGroupConfiguration. For documentation on HostGroupConfiguration please see our API reference: https://docs.oracle.com/en-us/iaas/api/#/en/iaas/20160918/datatypes/HostGroupConfiguration.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP) +@cli_util.option('--is-targeted-placement-required', type=click.BOOL, help=u"""A flag that allows customers to restrict placement for hosts attached to the group. If true, the only way to place on hosts is to target the specific host group.""") @cli_util.option('--defined-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags]. Example: `{\"Operations\": {\"CostCenter\": \"42\"}}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP) -@cli_util.option('--display-name', help=u"""A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.""") @cli_util.option('--freeform-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags]. Example: `{\"Department\": \"Finance\"}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP) @cli_util.option('--if-match', help=u"""For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.""") @cli_util.option('--force', help="""Perform update without prompting for confirmation.""", is_flag=True) -@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED"]), 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({'defined-tags': {'module': 'core', 'class': 'dict(str, dict(str, object))'}, 'freeform-tags': {'module': 'core', 'class': 'dict(str, string)'}}) +@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACTIVE", "DELETED"]), multiple=True, help="""This operation creates, modifies or deletes a resource that has a defined lifecycle state. Specify this option to perform the action and then wait until the resource reaches a given lifecycle state. Multiple states can be specified, returning on the first state. For example, --wait-for-state ACTIVE --wait-for-state DELETED would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.""") +@cli_util.option('--max-wait-seconds', type=click.INT, help="""The maximum time to wait for the resource to reach the lifecycle state defined by --wait-for-state. Defaults to 1200 seconds.""") +@cli_util.option('--wait-interval-seconds', type=click.INT, help="""Check every --wait-interval-seconds to see whether the resource has reached the lifecycle state defined by --wait-for-state. Defaults to 30 seconds.""") +@json_skeleton_utils.get_cli_json_input_option({'configurations': {'module': 'core', 'class': 'list[HostGroupConfiguration]'}, 'defined-tags': {'module': 'core', 'class': 'dict(str, dict(str, object))'}, 'freeform-tags': {'module': 'core', 'class': 'dict(str, string)'}}) @cli_util.help_option @click.pass_context -@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'defined-tags': {'module': 'core', 'class': 'dict(str, dict(str, object))'}, 'freeform-tags': {'module': 'core', 'class': 'dict(str, string)'}}) +@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'configurations': {'module': 'core', 'class': 'list[HostGroupConfiguration]'}, 'defined-tags': {'module': 'core', 'class': 'dict(str, dict(str, object))'}, 'freeform-tags': {'module': 'core', 'class': 'dict(str, string)'}}, output_type={'module': 'core', 'class': 'ComputeHostGroup'}) @cli_util.wrap_exceptions -def update_compute_hosts(ctx, from_json, force, wait_for_state, max_wait_seconds, wait_interval_seconds, compute_host_id, defined_tags, display_name, freeform_tags, if_match): +def update_compute_host_group(ctx, from_json, force, wait_for_state, max_wait_seconds, wait_interval_seconds, compute_host_group_id, display_name, configurations, is_targeted_placement_required, defined_tags, freeform_tags, if_match): - if isinstance(compute_host_id, six.string_types) and len(compute_host_id.strip()) == 0: - raise click.UsageError('Parameter --compute-host-id cannot be whitespace or empty string') + if isinstance(compute_host_group_id, six.string_types) and len(compute_host_group_id.strip()) == 0: + raise click.UsageError('Parameter --compute-host-group-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 configurations or defined_tags or freeform_tags: + if not click.confirm("WARNING: Updates to configurations and defined-tags and freeform-tags will replace any existing values. Are you sure you want to continue?"): ctx.abort() kwargs = {} @@ -11983,56 +12075,50 @@ def update_compute_hosts(ctx, from_json, force, wait_for_state, max_wait_seconds _details = {} - if defined_tags is not None: - _details['definedTags'] = cli_util.parse_json_parameter("defined_tags", defined_tags) - if display_name is not None: _details['displayName'] = display_name + if configurations is not None: + _details['configurations'] = cli_util.parse_json_parameter("configurations", configurations) + + if is_targeted_placement_required is not None: + _details['isTargetedPlacementRequired'] = is_targeted_placement_required + + if defined_tags is not None: + _details['definedTags'] = cli_util.parse_json_parameter("defined_tags", defined_tags) + if freeform_tags is not None: _details['freeformTags'] = cli_util.parse_json_parameter("freeform_tags", freeform_tags) client = cli_util.build_client('core', 'compute', ctx) - result = client.update_compute_hosts( - compute_host_id=compute_host_id, - update_compute_hosts_details=_details, + result = client.update_compute_host_group( + compute_host_group_id=compute_host_group_id, + update_compute_host_group_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')): + if hasattr(client, 'get_compute_host_group') and callable(getattr(client, 'get_compute_host_group')): 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) + click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr) + result = oci.wait_until(client, client.get_compute_host_group(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 work request entered the specified state. Outputting last known resource state', file=sys.stderr) + 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 work request to enter the specified state. Outputting last known resource state', file=sys.stderr) + 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 work request to enter the specified state', file=sys.stderr) + click.echo('Unable to wait for the resource to enter the specified state', file=sys.stderr) cli_util.render_response(result, 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 f1103983..bc9fc82b 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 @@ -1187,9 +1187,9 @@ def bulk_add_virtual_circuit_public_prefixes(ctx, from_json, virtual_circuit_id, cli_util.render_response(result, ctx) -@ipv6_group.command(name=cli_util.override('virtual_network.bulk_create_ipv6s.command_name', 'bulk-create'), help=u"""Create new IPv6s for a VNIC or Subnet. \n[Command Reference](bulkCreateIpv6s)""") -@cli_util.option('--bulk-create-ipv6s-item', required=True, type=custom_types.CLI_COMPLEX_TYPE, help=u"""Secondary IPv6 addresses to assign.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP) -@cli_util.option('--vnic-id', help=u"""The [OCID] of the VNIC to assign the IPv6s to. The IPv6 will be in the VNIC's subnet.""") +@ipv6_group.command(name=cli_util.override('virtual_network.bulk_create_ipv6s.command_name', 'bulk-create'), help=u"""Create new IPv6s in bulk for a VNIC or subnet. \n[Command Reference](bulkCreateIpv6s)""") +@cli_util.option('--bulk-create-ipv6s-item', required=True, type=custom_types.CLI_COMPLEX_TYPE, help=u"""A secondary IPv6 address to assign.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP) +@cli_util.option('--vnic-id', help=u"""The [OCID] of the VNIC to assign the IPv6s to. The IPv6s will be in the VNIC's subnet.""") @cli_util.option('--subnet-id', help=u"""The [OCID] of the subnet from which the IPv6s are to be drawn. The IP addresses, *if supplied*, must be valid for the given subnet, only valid for reserved IPs currently.""") @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.""") @@ -1257,7 +1257,7 @@ def bulk_create_ipv6s(ctx, from_json, wait_for_state, max_wait_seconds, wait_int @private_ip_group.command(name=cli_util.override('virtual_network.bulk_create_private_ips.command_name', 'bulk-create'), help=u"""Create secondary private IPv4 addresses. \n[Command Reference](bulkCreatePrivateIps)""") -@cli_util.option('--bulk-create-private-ip-item', required=True, type=custom_types.CLI_COMPLEX_TYPE, help=u"""Secondary IPv4 addresses to assign.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP) +@cli_util.option('--bulk-create-private-ip-item', required=True, type=custom_types.CLI_COMPLEX_TYPE, help=u"""A secondary IPv4 address to assign.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP) @cli_util.option('--vnic-id', help=u"""The [OCID] of the VNIC to assign the private IPs to. The VNIC and private IPs must be in the same subnet.""") @cli_util.option('--vlan-id', help=u"""Use this attribute only with the Oracle Cloud VMware Solution. The [OCID] of the VLAN from which the private IPs is to be drawn. The IP addresses, *if supplied*, must be valid for the given VLAN. See [Vlan].""") @cli_util.option('--subnet-id', help=u"""The [OCID] of the subnet from which the private IPs is to be drawn. The IP addresses, *if supplied*, must be valid for the given subnet.""") @@ -1329,10 +1329,10 @@ def bulk_create_private_ips(ctx, from_json, wait_for_state, max_wait_seconds, wa cli_util.render_response(result, ctx) -@ipv6_group.command(name=cli_util.override('virtual_network.bulk_delete_ipv6s.command_name', 'bulk-delete'), help=u"""Unassigns and deletes IPv6s for a VNIC. \n[Command Reference](bulkDeleteIpv6s)""") -@cli_util.option('--bulk-delete-ipv6s-item', required=True, type=custom_types.CLI_COMPLEX_TYPE, help=u"""IPv6 addresses to deleted.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP) +@ipv6_group.command(name=cli_util.override('virtual_network.bulk_delete_ipv6s.command_name', 'bulk-delete'), help=u"""Unassign and delete IPv6s for a VNIC in bulk. \n[Command Reference](bulkDeleteIpv6s)""") +@cli_util.option('--bulk-delete-ipv6s-item', required=True, type=custom_types.CLI_COMPLEX_TYPE, help=u"""An IPv6 address to delete.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP) @cli_util.option('--vnic-id', help=u"""The [OCID] of the VNIC to assign the IPv6s to. The IPv6 will be in the VNIC's subnet.""") -@cli_util.option('--subnet-id', help=u"""The [OCID] of the subnet from which the IPv6s addresses are to be deleted.""") +@cli_util.option('--subnet-id', help=u"""The [OCID] of the subnet from which the IPv6s addresses are deleted.""") @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.""") @@ -1398,8 +1398,8 @@ def bulk_delete_ipv6s(ctx, from_json, wait_for_state, max_wait_seconds, wait_int cli_util.render_response(result, ctx) -@private_ip_group.command(name=cli_util.override('virtual_network.bulk_delete_private_ips.command_name', 'bulk-delete'), help=u"""Unassigns and deletes secondary private IPv4s for a VNIC. \n[Command Reference](bulkDeletePrivateIps)""") -@cli_util.option('--bulk-delete-private-ip-item', required=True, type=custom_types.CLI_COMPLEX_TYPE, help=u"""Secondary IPv4 addresses to deleted""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP) +@private_ip_group.command(name=cli_util.override('virtual_network.bulk_delete_private_ips.command_name', 'bulk-delete'), help=u"""Unassign and delete secondary private IPv4s for a VNIC. \n[Command Reference](bulkDeletePrivateIps)""") +@cli_util.option('--bulk-delete-private-ip-item', required=True, type=custom_types.CLI_COMPLEX_TYPE, help=u"""A secondary IPv4 address to delete.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP) @cli_util.option('--vnic-id', help=u"""The [OCID] of the VNIC of which private IPs should be deleted. The VNIC and private IPs must be in the same subnet.""") @cli_util.option('--vlan-id', help=u"""Use this attribute only with the Oracle Cloud VMware Solution. The [OCID] of the VLAN from which the private IP is to be deleted.""") @cli_util.option('--subnet-id', help=u"""The [OCID] of the subnet from which the private IPs is to be deleted.""") @@ -1498,9 +1498,9 @@ def bulk_delete_virtual_circuit_public_prefixes(ctx, from_json, virtual_circuit_ cli_util.render_response(result, ctx) -@ipv6_group.command(name=cli_util.override('virtual_network.bulk_detach_ipv6s.command_name', 'bulk-detach'), help=u"""detach the specified IPv6s. \n[Command Reference](bulkDetachIpv6s)""") -@cli_util.option('--bulk-detach-ipv6s-item', required=True, type=custom_types.CLI_COMPLEX_TYPE, help=u"""Secondary IPv6 addresses to detached.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP) -@cli_util.option('--vnic-id', help=u"""The [OCID] of the VNIC of which IPv6s should be detached. The VNIC and IPv6s must be in the same subnet.""") +@ipv6_group.command(name=cli_util.override('virtual_network.bulk_detach_ipv6s.command_name', 'bulk-detach'), help=u"""Detach the specified IPv6s. \n[Command Reference](bulkDetachIpv6s)""") +@cli_util.option('--bulk-detach-ipv6s-item', required=True, type=custom_types.CLI_COMPLEX_TYPE, help=u"""A secondary IPv6 address to detach.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP) +@cli_util.option('--vnic-id', help=u"""The [OCID] of the VNIC from which multiple IPv6s should be detached. The VNIC and IPv6s must be in the same subnet.""") @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.""") @@ -1563,8 +1563,8 @@ def bulk_detach_ipv6s(ctx, from_json, wait_for_state, max_wait_seconds, wait_int cli_util.render_response(result, ctx) -@private_ip_group.command(name=cli_util.override('virtual_network.bulk_detach_private_ips.command_name', 'bulk-detach'), help=u"""Unassign the specified PrivateIP address from Virtual Network Interface Card (VNIC). You must specify the PrivateIP [OCID]. \n[Command Reference](bulkDetachPrivateIps)""") -@cli_util.option('--bulk-detach-private-ip-item', required=True, type=custom_types.CLI_COMPLEX_TYPE, help=u"""Secondary IPv4 addresses to detached.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP) +@private_ip_group.command(name=cli_util.override('virtual_network.bulk_detach_private_ips.command_name', 'bulk-detach'), help=u"""Unassign the specified private IP addresses from the Virtual Network Interface Card (VNIC). You must specify the PrivateIP object's [OCID]. \n[Command Reference](bulkDetachPrivateIps)""") +@cli_util.option('--bulk-detach-private-ip-item', required=True, type=custom_types.CLI_COMPLEX_TYPE, help=u"""Secondary IPv4 addresses to detach.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP) @cli_util.option('--vnic-id', help=u"""The [OCID] of the VNIC of which private IPs should be detached. The VNIC and private IPs must be in the same subnet.""") @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.""") @@ -1628,8 +1628,8 @@ def bulk_detach_private_ips(ctx, from_json, wait_for_state, max_wait_seconds, wa cli_util.render_response(result, ctx) -@ipv6_group.command(name=cli_util.override('virtual_network.bulk_update_ipv6s.command_name', 'bulk-update'), help=u"""Updates the specified IPv6s. \n[Command Reference](bulkUpdateIpv6s)""") -@cli_util.option('--bulk-update-ipv6s-item', required=True, type=custom_types.CLI_COMPLEX_TYPE, help=u"""Secondary IPv6 addresses to updated.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP) +@ipv6_group.command(name=cli_util.override('virtual_network.bulk_update_ipv6s.command_name', 'bulk-update'), help=u"""Updates the specified IPv6s in bulk. \n[Command Reference](bulkUpdateIpv6s)""") +@cli_util.option('--bulk-update-ipv6s-item', required=True, type=custom_types.CLI_COMPLEX_TYPE, help=u"""A secondary IPv6 address to update.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP) @cli_util.option('--vnic-id', help=u"""The [OCID] of the VNIC to move the IPv6s to. The VNIC and IPv6s must be in the same subnet.""") @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.""") @@ -1693,8 +1693,8 @@ def bulk_update_ipv6s(ctx, from_json, wait_for_state, max_wait_seconds, wait_int cli_util.render_response(result, ctx) -@private_ip_group.command(name=cli_util.override('virtual_network.bulk_update_private_ips.command_name', 'bulk-update'), help=u"""Updates existing secondary Private IPv4s for a VNIC. \n[Command Reference](bulkUpdatePrivateIps)""") -@cli_util.option('--bulk-update-private-ip-item', required=True, type=custom_types.CLI_COMPLEX_TYPE, help=u"""Secondary IPv4 addresses to updated.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP) +@private_ip_group.command(name=cli_util.override('virtual_network.bulk_update_private_ips.command_name', 'bulk-update'), help=u"""Update existing secondary private IPv4s for a VNIC. \n[Command Reference](bulkUpdatePrivateIps)""") +@cli_util.option('--bulk-update-private-ip-item', required=True, type=custom_types.CLI_COMPLEX_TYPE, help=u"""A secondary IPv4 address to update.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP) @cli_util.option('--vnic-id', help=u"""The [OCID] of the VNIC to reassign the private IPs to. The VNIC and private IPs must be in the same subnet.""") @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.""") @@ -4916,7 +4916,11 @@ def create_subnet(ctx, from_json, wait_for_state, max_wait_seconds, wait_interva @cli_util.option('--security-attributes', type=custom_types.CLI_COMPLEX_TYPE, help=u"""[Security attributes] are labels for a resource that can be referenced in a [Zero Trust Packet Routing] (ZPR) policy to control access to ZPR-supported resources. Example: `{\"Oracle-DataSecurity-ZPR\": {\"MaxEgressCount\": {\"value\":\"42\",\"mode\":\"audit\"}}}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP) -@cli_util.option('--is-ipv6-enabled', type=click.BOOL, help=u"""Whether IPv6 is enabled for the VCN. Default is `false`. If enabled, Oracle will assign the VCN a IPv6 /56 CIDR block. You may skip having Oracle allocate the VCN a IPv6 /56 CIDR block by setting isOracleGuaAllocationEnabled to `false`. For important details about IPv6 addressing in a VCN, see [IPv6 Addresses]. +@cli_util.option('--is-ipv6-enabled', type=click.BOOL, help=u"""Whether IPv6 is enabled for the VCN. Default is `false`. If enabled, Oracle will assign the VCN a IPv6 /56 CIDR block. + +You may skip having Oracle allocate the VCN a IPv6 /56 CIDR block by setting isOracleGuaAllocationEnabled to `false`. + +For important details about IPv6 addressing in a VCN, see [IPv6 Addresses]. Example: `true`""") @cli_util.option('--is-zpr-only', type=click.BOOL, help=u"""Indicates whether ZPR Only mode is enforced.""") @@ -5035,7 +5039,7 @@ def create_vcn(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_s @cli_util.option('--gateway-id', help=u"""For private virtual circuits only. The [OCID] of the [dynamic routing gateway (DRG)] that this virtual circuit uses.""") @cli_util.option('--provider-name', help=u"""Deprecated. Instead use `providerServiceId`. To get a list of the provider names, see [ListFastConnectProviderServices].""") @cli_util.option('--provider-service-id', help=u"""The [OCID] of the service offered by the provider (if you're connecting via a provider). To get a list of the available service offerings, see [ListFastConnectProviderServices].""") -@cli_util.option('--provider-service-key-name', help=u"""The service key name offered by the provider (if the customer is connecting via a provider).""") +@cli_util.option('--provider-service-key-name', help=u"""The service key name or activation key offered by the provider (if the customer is connecting via a provider).""") @cli_util.option('--provider-service-name', help=u"""Deprecated. Instead use `providerServiceId`. To get a list of the provider names, see [ListFastConnectProviderServices].""") @cli_util.option('--public-prefixes', type=custom_types.CLI_COMPLEX_TYPE, help=u"""For a public virtual circuit. The public IP prefixes (CIDRs) the customer wants to advertise across the connection. @@ -15228,7 +15232,9 @@ def update_vlan(ctx, from_json, force, wait_for_state, max_wait_seconds, wait_in For more information about NSGs, see [NetworkSecurityGroup].""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP) @cli_util.option('--skip-source-dest-check', type=click.BOOL, help=u"""Whether the source/destination check is disabled on the VNIC. Defaults to `false`, which means the check is performed. For information about why you would skip the source/destination check, see [Using a Private IP as a Route Target]. -If the VNIC belongs to a VLAN as part of the Oracle Cloud VMware Solution (instead of belonging to a subnet), the value of the `skipSourceDestCheck` attribute is ignored. This is because the source/destination check is always disabled for VNICs in a VLAN. Example: `true`""") +If the VNIC belongs to a VLAN as part of the Oracle Cloud VMware Solution (instead of belonging to a subnet), the value of the `skipSourceDestCheck` attribute is ignored. This is because the source/destination check is always disabled for VNICs in a VLAN. + +Example: `true`""") @cli_util.option('--route-table-id', help=u"""The [OCID] of the route table the IP address or VNIC will use. For more information, see [Per-resource Routing].""") @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) 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 9f52cf5e..05eb46da 100644 --- a/services/database/src/oci_cli_database/generated/database_cli.py +++ b/services/database/src/oci_cli_database/generated/database_cli.py @@ -12692,7 +12692,9 @@ def create_cloud_exadata_infrastructure(ctx, from_json, wait_for_state, max_wait @cli_util.option('--data-storage-size-in-tbs', help=u"""The data disk group size to be allocated in TBs.""") @cli_util.option('--db-servers', type=custom_types.CLI_COMPLEX_TYPE, help=u"""The list of DB servers.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP) @cli_util.option('--cluster-name', help=u"""The cluster name for cloud VM cluster. The cluster name must begin with an alphabetic character, and may contain hyphens (-). Underscores (_) are not permitted. The cluster name can be no longer than 11 characters and is not case sensitive.""") -@cli_util.option('--data-storage-percentage', type=click.INT, help=u"""The percentage assigned to DATA storage (user data and database files). The remaining percentage is assigned to RECO storage (database redo logs, archive logs, and recovery manager backups). Accepted values are 35, 40, 60 and 80. The default is 80 percent assigned to DATA storage. See [Storage Configuration] in the Exadata documentation for details on the impact of the configuration settings on storage.""") +@cli_util.option('--data-storage-percentage', type=click.INT, help=u"""The percentage assigned to DATA storage (user data and database files). See [Storage Configuration] in the Exadata documentation for details on the impact of the configuration settings on storage.""") +@cli_util.option('--reco-storage-percentage', type=click.INT, help=u"""The percentage assigned to RECO storage (database redo logs, archive logs, and recovery manager backups). See [Storage Configuration] in the Exadata documentation for details on the impact of the configuration settings on storage.""") +@cli_util.option('--sparse-storage-percentage', type=click.INT, help=u"""The percentage assigned to SPARSE storage (Exadata snapshots). See [Storage Configuration] in the Exadata documentation for details on the impact of the configuration settings on storage.""") @cli_util.option('--domain', help=u"""A domain name used for the cloud VM cluster. If the Oracle-provided internet and VCN resolver is enabled for the specified subnet, the domain name for the subnet is used (do not provide one). Otherwise, provide a valid DNS domain name. Hyphens (-) are not permitted. Applies to Exadata Cloud Service instances only.""") @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 cloud VM cluster. The default is BRING_YOUR_OWN_LICENSE.""") @cli_util.option('--is-sparse-diskgroup-enabled', type=click.BOOL, help=u"""If true, the sparse disk group is configured for the cloud VM cluster. If false, the sparse disk group is not created.""") @@ -12727,7 +12729,7 @@ def create_cloud_exadata_infrastructure(ctx, from_json, wait_for_state, max_wait @click.pass_context @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'db-servers': {'module': 'database', 'class': 'list[string]'}, 'ssh-public-keys': {'module': 'database', 'class': 'list[string]'}, 'nsg-ids': {'module': 'database', 'class': 'list[string]'}, 'backup-network-nsg-ids': {'module': 'database', 'class': 'list[string]'}, 'freeform-tags': {'module': 'database', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'database', 'class': 'dict(str, dict(str, object))'}, 'security-attributes': {'module': 'database', 'class': 'dict(str, dict(str, object))'}, 'data-collection-options': {'module': 'database', 'class': 'DataCollectionOptions'}, 'file-system-configuration-details': {'module': 'database', 'class': 'list[FileSystemConfigurationDetail]'}, 'cloud-automation-update-details': {'module': 'database', 'class': 'CloudAutomationUpdateDetails'}}, output_type={'module': 'database', 'class': 'CloudVmCluster'}) @cli_util.wrap_exceptions -def create_cloud_vm_cluster(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, compartment_id, subnet_id, backup_subnet_id, cpu_core_count, display_name, cloud_exadata_infrastructure_id, hostname, ssh_public_keys, gi_version, subscription_id, ocpu_count, memory_size_in_gbs, db_node_storage_size_in_gbs, data_storage_size_in_tbs, db_servers, cluster_name, data_storage_percentage, domain, license_model, is_sparse_diskgroup_enabled, is_local_backup_enabled, time_zone, scan_listener_port_tcp, scan_listener_port_tcp_ssl, private_zone_id, nsg_ids, backup_network_nsg_ids, freeform_tags, defined_tags, security_attributes, data_collection_options, system_version, file_system_configuration_details, cloud_automation_update_details, exascale_db_storage_vault_id, vm_cluster_type, vm_file_system_storage_type, vm_backup_storage_type, opc_dry_run): +def create_cloud_vm_cluster(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, compartment_id, subnet_id, backup_subnet_id, cpu_core_count, display_name, cloud_exadata_infrastructure_id, hostname, ssh_public_keys, gi_version, subscription_id, ocpu_count, memory_size_in_gbs, db_node_storage_size_in_gbs, data_storage_size_in_tbs, db_servers, cluster_name, data_storage_percentage, reco_storage_percentage, sparse_storage_percentage, domain, license_model, is_sparse_diskgroup_enabled, is_local_backup_enabled, time_zone, scan_listener_port_tcp, scan_listener_port_tcp_ssl, private_zone_id, nsg_ids, backup_network_nsg_ids, freeform_tags, defined_tags, security_attributes, data_collection_options, system_version, file_system_configuration_details, cloud_automation_update_details, exascale_db_storage_vault_id, vm_cluster_type, vm_file_system_storage_type, vm_backup_storage_type, opc_dry_run): kwargs = {} if opc_dry_run is not None: @@ -12769,6 +12771,12 @@ def create_cloud_vm_cluster(ctx, from_json, wait_for_state, max_wait_seconds, wa if data_storage_percentage is not None: _details['dataStoragePercentage'] = data_storage_percentage + if reco_storage_percentage is not None: + _details['recoStoragePercentage'] = reco_storage_percentage + + if sparse_storage_percentage is not None: + _details['sparseStoragePercentage'] = sparse_storage_percentage + if domain is not None: _details['domain'] = domain @@ -16884,6 +16892,9 @@ def create_scheduling_window(ctx, from_json, wait_for_state, max_wait_seconds, w @cli_util.option('--data-storage-size-in-tbs', help=u"""The data disk group size to be allocated in TBs.""") @cli_util.option('--data-storage-size-in-gbs', help=u"""The data disk group size to be allocated in GBs.""") @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 VM cluster. The default is BRING_YOUR_OWN_LICENSE.""") +@cli_util.option('--data-storage-percentage', type=click.INT, help=u"""The percentage assigned to DATA storage (user data and database files). See [Storage Configuration] in the Exadata documentation for details on the impact of the configuration settings on storage.""") +@cli_util.option('--reco-storage-percentage', type=click.INT, help=u"""The percentage assigned to RECO storage (database redo logs, archive logs, and recovery manager backups). See [Storage Configuration] in the Exadata documentation for details on the impact of the configuration settings on storage.""") +@cli_util.option('--sparse-storage-percentage', type=click.INT, help=u"""The percentage assigned to SPARSE storage (Exadata snapshots). See [Storage Configuration] in the Exadata documentation for details on the impact of the configuration settings on storage.""") @cli_util.option('--is-sparse-diskgroup-enabled', type=click.BOOL, help=u"""If true, the sparse disk group is configured for the VM cluster. If false, the sparse disk group is not created.""") @cli_util.option('--is-local-backup-enabled', type=click.BOOL, help=u"""If true, database backup on local Exadata storage is configured for the VM cluster. If false, database backup on local Exadata storage is not available in the VM cluster.""") @cli_util.option('--time-zone', help=u"""The time zone to use for the VM cluster. For details, see [DB System Time Zones].""") @@ -16910,7 +16921,7 @@ def create_scheduling_window(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={'ssh-public-keys': {'module': 'database', 'class': 'list[string]'}, 'db-servers': {'module': 'database', 'class': 'list[string]'}, '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'}, 'file-system-configuration-details': {'module': 'database', 'class': 'list[FileSystemConfigurationDetail]'}, 'cloud-automation-update-details': {'module': 'database', 'class': 'CloudAutomationUpdateDetails'}}, output_type={'module': 'database', 'class': 'VmCluster'}) @cli_util.wrap_exceptions -def create_vm_cluster(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, compartment_id, display_name, exadata_infrastructure_id, cpu_core_count, ssh_public_keys, vm_cluster_network_id, gi_version, ocpu_count, memory_size_in_gbs, db_node_storage_size_in_gbs, data_storage_size_in_tbs, data_storage_size_in_gbs, license_model, is_sparse_diskgroup_enabled, is_local_backup_enabled, time_zone, db_servers, freeform_tags, defined_tags, data_collection_options, system_version, file_system_configuration_details, vm_cluster_type, cloud_automation_update_details, exascale_db_storage_vault_id, vm_file_system_storage_type, vm_backup_storage_type): +def create_vm_cluster(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, compartment_id, display_name, exadata_infrastructure_id, cpu_core_count, ssh_public_keys, vm_cluster_network_id, gi_version, ocpu_count, memory_size_in_gbs, db_node_storage_size_in_gbs, data_storage_size_in_tbs, data_storage_size_in_gbs, license_model, data_storage_percentage, reco_storage_percentage, sparse_storage_percentage, is_sparse_diskgroup_enabled, is_local_backup_enabled, time_zone, db_servers, freeform_tags, defined_tags, data_collection_options, system_version, file_system_configuration_details, vm_cluster_type, cloud_automation_update_details, exascale_db_storage_vault_id, vm_file_system_storage_type, vm_backup_storage_type): kwargs = {} kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id']) @@ -16942,6 +16953,15 @@ def create_vm_cluster(ctx, from_json, wait_for_state, max_wait_seconds, wait_int if license_model is not None: _details['licenseModel'] = license_model + if data_storage_percentage is not None: + _details['dataStoragePercentage'] = data_storage_percentage + + if reco_storage_percentage is not None: + _details['recoStoragePercentage'] = reco_storage_percentage + + if sparse_storage_percentage is not None: + _details['sparseStoragePercentage'] = sparse_storage_percentage + if is_sparse_diskgroup_enabled is not None: _details['isSparseDiskgroupEnabled'] = is_sparse_diskgroup_enabled @@ -38285,6 +38305,11 @@ def update_cloud_exadata_infrastructure(ctx, from_json, force, wait_for_state, m This option is a JSON list with items of type FileSystemConfigurationDetail. For documentation on FileSystemConfigurationDetail please see our API reference: https://docs.oracle.com/en-us/iaas/api/#/en/database/20160918/datatypes/FileSystemConfigurationDetail.""" + 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('--vm-backup-storage-type', type=custom_types.CliCaseInsensitiveChoice(["LOCAL", "EXASCALE"]), help=u"""Specifies the type of VM Backups Storage and supported values are LOCAL and EXASCALE. Storage Type can only be changed once from LOCAL to EXASCALE. EXASCALE to LOCAL is not permitted.""") +@cli_util.option('--data-storage-percentage', type=click.INT, help=u"""The percentage assigned to DATA storage (user data and database files). See [Storage Configuration] in the Exadata documentation for details on the impact of the configuration settings on storage.""") +@cli_util.option('--reco-storage-percentage', type=click.INT, help=u"""The percentage assigned to RECO storage (database redo logs, archive logs, and recovery manager backups). See [Storage Configuration] in the Exadata documentation for details on the impact of the configuration settings on storage.""") +@cli_util.option('--sparse-storage-percentage', type=click.INT, help=u"""The percentage assigned to SPARSE storage (Exadata snapshots). See [Storage Configuration] in the Exadata documentation for details on the impact of the configuration settings on storage.""") +@cli_util.option('--is-local-backup-enabled', type=click.BOOL, help=u"""If true, database backup on local Exadata storage is configured for the cloud VM cluster. If false, database backup on local Exadata storage is not available in the cloud VM cluster.""") +@cli_util.option('--is-sparse-diskgroup-enabled', type=click.BOOL, help=u"""If true, sparse disk group is configured for the cloud VM cluster. If false, sparse disk group is not created.""") @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.""") @@ -38295,7 +38320,7 @@ def update_cloud_exadata_infrastructure(ctx, from_json, force, wait_for_state, m @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': 'UpdateDetails'}, 'nsg-ids': {'module': 'database', 'class': 'list[string]'}, 'backup-network-nsg-ids': {'module': 'database', 'class': 'list[string]'}, 'compute-nodes': {'module': 'database', 'class': 'list[string]'}, 'freeform-tags': {'module': 'database', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'database', 'class': 'dict(str, dict(str, object))'}, 'security-attributes': {'module': 'database', 'class': 'dict(str, dict(str, object))'}, 'data-collection-options': {'module': 'database', 'class': 'DataCollectionOptions'}, 'file-system-configuration-details': {'module': 'database', 'class': 'list[FileSystemConfigurationDetail]'}, 'cloud-automation-update-details': {'module': 'database', 'class': 'CloudAutomationUpdateDetails'}}, output_type={'module': 'database', 'class': 'CloudVmCluster'}) @cli_util.wrap_exceptions -def update_cloud_vm_cluster(ctx, from_json, force, wait_for_state, max_wait_seconds, wait_interval_seconds, cloud_vm_cluster_id, display_name, cpu_core_count, ocpu_count, memory_size_in_gbs, db_node_storage_size_in_gbs, data_storage_size_in_tbs, license_model, ssh_public_keys, update_details, nsg_ids, backup_network_nsg_ids, compute_nodes, storage_size_in_gbs, freeform_tags, defined_tags, security_attributes, data_collection_options, file_system_configuration_details, cloud_automation_update_details, vm_backup_storage_type, if_match): +def update_cloud_vm_cluster(ctx, from_json, force, wait_for_state, max_wait_seconds, wait_interval_seconds, cloud_vm_cluster_id, display_name, cpu_core_count, ocpu_count, memory_size_in_gbs, db_node_storage_size_in_gbs, data_storage_size_in_tbs, license_model, ssh_public_keys, update_details, nsg_ids, backup_network_nsg_ids, compute_nodes, storage_size_in_gbs, freeform_tags, defined_tags, security_attributes, data_collection_options, file_system_configuration_details, cloud_automation_update_details, vm_backup_storage_type, data_storage_percentage, reco_storage_percentage, sparse_storage_percentage, is_local_backup_enabled, is_sparse_diskgroup_enabled, if_match): if isinstance(cloud_vm_cluster_id, six.string_types) and len(cloud_vm_cluster_id.strip()) == 0: raise click.UsageError('Parameter --cloud-vm-cluster-id cannot be whitespace or empty string') @@ -38371,6 +38396,21 @@ def update_cloud_vm_cluster(ctx, from_json, force, wait_for_state, max_wait_seco if vm_backup_storage_type is not None: _details['vmBackupStorageType'] = vm_backup_storage_type + if data_storage_percentage is not None: + _details['dataStoragePercentage'] = data_storage_percentage + + if reco_storage_percentage is not None: + _details['recoStoragePercentage'] = reco_storage_percentage + + if sparse_storage_percentage is not None: + _details['sparseStoragePercentage'] = sparse_storage_percentage + + if is_local_backup_enabled is not None: + _details['isLocalBackupEnabled'] = is_local_backup_enabled + + if is_sparse_diskgroup_enabled is not None: + _details['isSparseDiskgroupEnabled'] = is_sparse_diskgroup_enabled + client = cli_util.build_client('database', 'database', ctx) result = client.update_cloud_vm_cluster( cloud_vm_cluster_id=cloud_vm_cluster_id, @@ -40848,6 +40888,11 @@ def update_scheduling_window(ctx, from_json, force, wait_for_state, max_wait_sec @cli_util.option('--db-node-storage-size-in-gbs', type=click.INT, help=u"""The local node storage to be allocated in GBs.""") @cli_util.option('--data-storage-size-in-tbs', help=u"""The data disk group size to be allocated in TBs.""") @cli_util.option('--data-storage-size-in-gbs', help=u"""The data disk group size to be allocated in GBs.""") +@cli_util.option('--data-storage-percentage', type=click.INT, help=u"""The percentage assigned to DATA storage (user data and database files). See [Storage Configuration] in the Exadata documentation for details on the impact of the configuration settings on storage.""") +@cli_util.option('--reco-storage-percentage', type=click.INT, help=u"""The percentage assigned to RECO storage (database redo logs, archive logs, and recovery manager backups). See [Storage Configuration] in the Exadata documentation for details on the impact of the configuration settings on storage.""") +@cli_util.option('--sparse-storage-percentage', type=click.INT, help=u"""The percentage assigned to SPARSE storage (Exadata snapshots). See [Storage Configuration] in the Exadata documentation for details on the impact of the configuration settings on storage.""") +@cli_util.option('--is-local-backup-enabled', type=click.BOOL, help=u"""If true, database backup on local Exadata storage is configured for the VM cluster. If false, database backup on local Exadata storage is not available in the VM cluster.""") +@cli_util.option('--is-sparse-diskgroup-enabled', type=click.BOOL, help=u"""If true, sparse disk group is configured for the VM cluster. If false, sparse disk group is not created.""") @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 VM cluster. The default is BRING_YOUR_OWN_LICENSE.""") @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 VM cluster.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP) @cli_util.option('--version-parameterconflict', type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP) @@ -40872,7 +40917,7 @@ def update_scheduling_window(ctx, from_json, force, wait_for_state, max_wait_sec @click.pass_context @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'ssh-public-keys': {'module': 'database', 'class': 'list[string]'}, 'version-parameterconflict': {'module': 'database', 'class': 'PatchDetails'}, 'update-details': {'module': 'database', 'class': 'VmClusterUpdateDetails'}, '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'}, 'file-system-configuration-details': {'module': 'database', 'class': 'list[FileSystemConfigurationDetail]'}, 'cloud-automation-update-details': {'module': 'database', 'class': 'CloudAutomationUpdateDetails'}}, output_type={'module': 'database', 'class': 'VmCluster'}) @cli_util.wrap_exceptions -def update_vm_cluster(ctx, from_json, force, wait_for_state, max_wait_seconds, wait_interval_seconds, vm_cluster_id, cpu_core_count, ocpu_count, memory_size_in_gbs, db_node_storage_size_in_gbs, data_storage_size_in_tbs, data_storage_size_in_gbs, license_model, ssh_public_keys, version_parameterconflict, update_details, freeform_tags, defined_tags, data_collection_options, file_system_configuration_details, cloud_automation_update_details, vm_backup_storage_type, if_match): +def update_vm_cluster(ctx, from_json, force, wait_for_state, max_wait_seconds, wait_interval_seconds, vm_cluster_id, cpu_core_count, ocpu_count, memory_size_in_gbs, db_node_storage_size_in_gbs, data_storage_size_in_tbs, data_storage_size_in_gbs, data_storage_percentage, reco_storage_percentage, sparse_storage_percentage, is_local_backup_enabled, is_sparse_diskgroup_enabled, license_model, ssh_public_keys, version_parameterconflict, update_details, freeform_tags, defined_tags, data_collection_options, file_system_configuration_details, cloud_automation_update_details, vm_backup_storage_type, if_match): if isinstance(vm_cluster_id, six.string_types) and len(vm_cluster_id.strip()) == 0: raise click.UsageError('Parameter --vm-cluster-id cannot be whitespace or empty string') @@ -40906,6 +40951,21 @@ def update_vm_cluster(ctx, from_json, force, wait_for_state, max_wait_seconds, w if data_storage_size_in_gbs is not None: _details['dataStorageSizeInGBs'] = data_storage_size_in_gbs + if data_storage_percentage is not None: + _details['dataStoragePercentage'] = data_storage_percentage + + if reco_storage_percentage is not None: + _details['recoStoragePercentage'] = reco_storage_percentage + + if sparse_storage_percentage is not None: + _details['sparseStoragePercentage'] = sparse_storage_percentage + + if is_local_backup_enabled is not None: + _details['isLocalBackupEnabled'] = is_local_backup_enabled + + if is_sparse_diskgroup_enabled is not None: + _details['isSparseDiskgroupEnabled'] = is_sparse_diskgroup_enabled + if license_model is not None: _details['licenseModel'] = license_model diff --git a/services/functions/src/oci_cli_functions_management/generated/functionsmanagement_cli.py b/services/functions/src/oci_cli_functions_management/generated/functionsmanagement_cli.py index 464a746c..b1a6171b 100644 --- a/services/functions/src/oci_cli_functions_management/generated/functionsmanagement_cli.py +++ b/services/functions/src/oci_cli_functions_management/generated/functionsmanagement_cli.py @@ -106,6 +106,7 @@ def change_application_compartment(ctx, from_json, application_id, compartment_i Example: `tcp://logserver.myserver:1234`""") @cli_util.option('--trace-config', type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP) +@cli_util.option('--logging', 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) @@ -119,12 +120,12 @@ def change_application_compartment(ctx, from_json, application_id, compartment_i @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["CREATING", "ACTIVE", "INACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED"]), multiple=True, help="""This operation creates, modifies or deletes a resource that has a defined lifecycle state. Specify this option to perform the action and then wait until the resource reaches a given lifecycle state. Multiple states can be specified, returning on the first state. For example, --wait-for-state CREATING --wait-for-state FAILED would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.""") @cli_util.option('--max-wait-seconds', type=click.INT, help="""The maximum time to wait for the resource to reach the lifecycle state defined by --wait-for-state. Defaults to 1200 seconds.""") @cli_util.option('--wait-interval-seconds', type=click.INT, help="""Check every --wait-interval-seconds to see whether the resource has reached the lifecycle state defined by --wait-for-state. Defaults to 30 seconds.""") -@json_skeleton_utils.get_cli_json_input_option({'config': {'module': 'functions', 'class': 'dict(str, string)'}, 'subnet-ids': {'module': 'functions', 'class': 'list[string]'}, 'network-security-group-ids': {'module': 'functions', 'class': 'list[string]'}, 'trace-config': {'module': 'functions', 'class': 'ApplicationTraceConfig'}, 'freeform-tags': {'module': 'functions', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'functions', 'class': 'dict(str, dict(str, object))'}, 'image-policy-config': {'module': 'functions', 'class': 'ImagePolicyConfig'}, 'security-attributes': {'module': 'functions', 'class': 'dict(str, dict(str, object))'}}) +@json_skeleton_utils.get_cli_json_input_option({'config': {'module': 'functions', 'class': 'dict(str, string)'}, 'subnet-ids': {'module': 'functions', 'class': 'list[string]'}, 'network-security-group-ids': {'module': 'functions', 'class': 'list[string]'}, 'trace-config': {'module': 'functions', 'class': 'ApplicationTraceConfig'}, 'logging': {'module': 'functions', 'class': 'ApplicationLoggingConfig'}, 'freeform-tags': {'module': 'functions', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'functions', 'class': 'dict(str, dict(str, object))'}, 'image-policy-config': {'module': 'functions', 'class': 'ImagePolicyConfig'}, 'security-attributes': {'module': 'functions', '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={'config': {'module': 'functions', 'class': 'dict(str, string)'}, 'subnet-ids': {'module': 'functions', 'class': 'list[string]'}, 'network-security-group-ids': {'module': 'functions', 'class': 'list[string]'}, 'trace-config': {'module': 'functions', 'class': 'ApplicationTraceConfig'}, 'freeform-tags': {'module': 'functions', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'functions', 'class': 'dict(str, dict(str, object))'}, 'image-policy-config': {'module': 'functions', 'class': 'ImagePolicyConfig'}, 'security-attributes': {'module': 'functions', 'class': 'dict(str, dict(str, object))'}}, output_type={'module': 'functions', 'class': 'Application'}) +@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'config': {'module': 'functions', 'class': 'dict(str, string)'}, 'subnet-ids': {'module': 'functions', 'class': 'list[string]'}, 'network-security-group-ids': {'module': 'functions', 'class': 'list[string]'}, 'trace-config': {'module': 'functions', 'class': 'ApplicationTraceConfig'}, 'logging': {'module': 'functions', 'class': 'ApplicationLoggingConfig'}, 'freeform-tags': {'module': 'functions', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'functions', 'class': 'dict(str, dict(str, object))'}, 'image-policy-config': {'module': 'functions', 'class': 'ImagePolicyConfig'}, 'security-attributes': {'module': 'functions', 'class': 'dict(str, dict(str, object))'}}, output_type={'module': 'functions', 'class': 'Application'}) @cli_util.wrap_exceptions -def create_application(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, compartment_id, display_name, subnet_ids, config, shape, network_security_group_ids, syslog_url, trace_config, freeform_tags, defined_tags, image_policy_config, security_attributes): +def create_application(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, compartment_id, display_name, subnet_ids, config, shape, network_security_group_ids, syslog_url, trace_config, logging, freeform_tags, defined_tags, image_policy_config, security_attributes): kwargs = {} kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id']) @@ -149,6 +150,9 @@ def create_application(ctx, from_json, wait_for_state, max_wait_seconds, wait_in if trace_config is not None: _details['traceConfig'] = cli_util.parse_json_parameter("trace_config", trace_config) + if logging is not None: + _details['logging'] = cli_util.parse_json_parameter("logging", logging) + if freeform_tags is not None: _details['freeformTags'] = cli_util.parse_json_parameter("freeform_tags", freeform_tags) @@ -2081,6 +2085,7 @@ def list_triggers(ctx, from_json, all_pages, page_size, name, limit, page, sort_ Example: `tcp://logserver.myserver:1234`""") @cli_util.option('--trace-config', type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP) +@cli_util.option('--logging', 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) @@ -2096,18 +2101,18 @@ def list_triggers(ctx, from_json, all_pages, page_size, name, limit, page, sort_ @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["CREATING", "ACTIVE", "INACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED"]), multiple=True, help="""This operation creates, modifies or deletes a resource that has a defined lifecycle state. Specify this option to perform the action and then wait until the resource reaches a given lifecycle state. Multiple states can be specified, returning on the first state. For example, --wait-for-state CREATING --wait-for-state FAILED would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.""") @cli_util.option('--max-wait-seconds', type=click.INT, help="""The maximum time to wait for the resource to reach the lifecycle state defined by --wait-for-state. Defaults to 1200 seconds.""") @cli_util.option('--wait-interval-seconds', type=click.INT, help="""Check every --wait-interval-seconds to see whether the resource has reached the lifecycle state defined by --wait-for-state. Defaults to 30 seconds.""") -@json_skeleton_utils.get_cli_json_input_option({'config': {'module': 'functions', 'class': 'dict(str, string)'}, 'network-security-group-ids': {'module': 'functions', 'class': 'list[string]'}, 'trace-config': {'module': 'functions', 'class': 'ApplicationTraceConfig'}, 'freeform-tags': {'module': 'functions', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'functions', 'class': 'dict(str, dict(str, object))'}, 'image-policy-config': {'module': 'functions', 'class': 'ImagePolicyConfig'}, 'security-attributes': {'module': 'functions', 'class': 'dict(str, dict(str, object))'}}) +@json_skeleton_utils.get_cli_json_input_option({'config': {'module': 'functions', 'class': 'dict(str, string)'}, 'network-security-group-ids': {'module': 'functions', 'class': 'list[string]'}, 'trace-config': {'module': 'functions', 'class': 'ApplicationTraceConfig'}, 'logging': {'module': 'functions', 'class': 'ApplicationLoggingConfig'}, 'freeform-tags': {'module': 'functions', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'functions', 'class': 'dict(str, dict(str, object))'}, 'image-policy-config': {'module': 'functions', 'class': 'ImagePolicyConfig'}, 'security-attributes': {'module': 'functions', '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={'config': {'module': 'functions', 'class': 'dict(str, string)'}, 'network-security-group-ids': {'module': 'functions', 'class': 'list[string]'}, 'trace-config': {'module': 'functions', 'class': 'ApplicationTraceConfig'}, 'freeform-tags': {'module': 'functions', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'functions', 'class': 'dict(str, dict(str, object))'}, 'image-policy-config': {'module': 'functions', 'class': 'ImagePolicyConfig'}, 'security-attributes': {'module': 'functions', 'class': 'dict(str, dict(str, object))'}}, output_type={'module': 'functions', 'class': 'Application'}) +@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'config': {'module': 'functions', 'class': 'dict(str, string)'}, 'network-security-group-ids': {'module': 'functions', 'class': 'list[string]'}, 'trace-config': {'module': 'functions', 'class': 'ApplicationTraceConfig'}, 'logging': {'module': 'functions', 'class': 'ApplicationLoggingConfig'}, 'freeform-tags': {'module': 'functions', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'functions', 'class': 'dict(str, dict(str, object))'}, 'image-policy-config': {'module': 'functions', 'class': 'ImagePolicyConfig'}, 'security-attributes': {'module': 'functions', 'class': 'dict(str, dict(str, object))'}}, output_type={'module': 'functions', 'class': 'Application'}) @cli_util.wrap_exceptions -def update_application(ctx, from_json, force, wait_for_state, max_wait_seconds, wait_interval_seconds, application_id, config, network_security_group_ids, syslog_url, trace_config, freeform_tags, defined_tags, image_policy_config, security_attributes, if_match): +def update_application(ctx, from_json, force, wait_for_state, max_wait_seconds, wait_interval_seconds, application_id, config, network_security_group_ids, syslog_url, trace_config, logging, freeform_tags, defined_tags, image_policy_config, security_attributes, if_match): if isinstance(application_id, six.string_types) and len(application_id.strip()) == 0: raise click.UsageError('Parameter --application-id cannot be whitespace or empty string') if not force: - if config or network_security_group_ids or trace_config or freeform_tags or defined_tags or image_policy_config or security_attributes: - if not click.confirm("WARNING: Updates to config and network-security-group-ids and trace-config and freeform-tags and defined-tags and image-policy-config and security-attributes will replace any existing values. Are you sure you want to continue?"): + if config or network_security_group_ids or trace_config or logging or freeform_tags or defined_tags or image_policy_config or security_attributes: + if not click.confirm("WARNING: Updates to config and network-security-group-ids and trace-config and logging and freeform-tags and defined-tags and image-policy-config and security-attributes will replace any existing values. Are you sure you want to continue?"): ctx.abort() kwargs = {} @@ -2129,6 +2134,9 @@ def update_application(ctx, from_json, force, wait_for_state, max_wait_seconds, if trace_config is not None: _details['traceConfig'] = cli_util.parse_json_parameter("trace_config", trace_config) + if logging is not None: + _details['logging'] = cli_util.parse_json_parameter("logging", logging) + if freeform_tags is not None: _details['freeformTags'] = cli_util.parse_json_parameter("freeform_tags", freeform_tags) diff --git a/services/fusion_apps/src/oci_cli_fusion_applications/generated/fusionapplications_cli.py b/services/fusion_apps/src/oci_cli_fusion_applications/generated/fusionapplications_cli.py index 574f6f4f..5e9ab67b 100644 --- a/services/fusion_apps/src/oci_cli_fusion_applications/generated/fusionapplications_cli.py +++ b/services/fusion_apps/src/oci_cli_fusion_applications/generated/fusionapplications_cli.py @@ -40,6 +40,12 @@ def update_refresh_activity_details_group(): pass +@click.command(cli_util.override('fusion_apps.microsite_group.command_name', 'microsite'), cls=CommandGroupWithAlias, help="""microsite details for a marketing brand""") +@cli_util.help_option_group +def microsite_group(): + pass + + @click.command(cli_util.override('fusion_apps.work_request_log_entry_group.command_name', 'work-request-log-entry'), cls=CommandGroupWithAlias, help="""A log message from the execution of a work request.""") @cli_util.help_option_group def work_request_log_entry_group(): @@ -70,6 +76,12 @@ def data_masking_activity_group(): pass +@click.command(cli_util.override('fusion_apps.marketing_brand_group.command_name', 'marketing-brand'), cls=CommandGroupWithAlias, help="""marketing brand details for fusion environment""") +@cli_util.help_option_group +def marketing_brand_group(): + pass + + @click.command(cli_util.override('fusion_apps.work_request_error_group.command_name', 'work-request-error'), cls=CommandGroupWithAlias, help="""An error encountered while executing a work request.""") @cli_util.help_option_group def work_request_error_group(): @@ -100,6 +112,12 @@ def fusion_environment_family_limits_and_usage_group(): pass +@click.command(cli_util.override('fusion_apps.email_subdomain_group.command_name', 'email-subdomain'), cls=CommandGroupWithAlias, help="""email subdomain details for a marketing brand""") +@cli_util.help_option_group +def email_subdomain_group(): + pass + + @click.command(cli_util.override('fusion_apps.scheduled_activity_group.command_name', 'scheduled-activity'), cls=CommandGroupWithAlias, help="""Details of scheduled activity.""") @cli_util.help_option_group def scheduled_activity_group(): @@ -109,16 +127,19 @@ def scheduled_activity_group(): fusion_apps_root_group.add_command(fusion_environment_family_group) fusion_apps_root_group.add_command(refresh_activity_group) fusion_apps_root_group.add_command(update_refresh_activity_details_group) +fusion_apps_root_group.add_command(microsite_group) fusion_apps_root_group.add_command(work_request_log_entry_group) fusion_apps_root_group.add_command(work_request_group) fusion_apps_root_group.add_command(create_refresh_activity_details_group) fusion_apps_root_group.add_command(fusion_environment_group) fusion_apps_root_group.add_command(data_masking_activity_group) +fusion_apps_root_group.add_command(marketing_brand_group) fusion_apps_root_group.add_command(work_request_error_group) fusion_apps_root_group.add_command(service_attachment_group) fusion_apps_root_group.add_command(fusion_environment_status_group) fusion_apps_root_group.add_command(time_available_for_refresh_group) fusion_apps_root_group.add_command(fusion_environment_family_limits_and_usage_group) +fusion_apps_root_group.add_command(email_subdomain_group) fusion_apps_root_group.add_command(scheduled_activity_group) @@ -304,6 +325,77 @@ def create_data_masking_activity(ctx, from_json, wait_for_state, max_wait_second cli_util.render_response(result, ctx) +@email_subdomain_group.command(name=cli_util.override('fusion_apps.create_email_subdomain.command_name', 'create'), help=u"""Creates an email Subdomain for a brand \n[Command Reference](createEmailSubdomain)""") +@cli_util.option('--fusion-environment-id', required=True, help=u"""unique FusionEnvironment identifier""") +@cli_util.option('--marketing-brand-id', required=True, help=u"""unique brand identifier""") +@cli_util.option('--name', required=True, help=u"""email subdomain name""") +@cli_util.option('--dns-management', required=True, help=u"""dns management type for email subdomain""") +@cli_util.option('--certificate-management', required=True, help=u"""certificate management type for email subdomain""") +@cli_util.option('--freeform-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: `{\"bar-key\": \"value\"}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP) +@cli_util.option('--defined-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP) +@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACTIVE", "INACTIVE"]), multiple=True, help="""This operation creates, modifies or deletes a resource that has a defined lifecycle state. Specify this option to perform the action and then wait until the resource reaches a given lifecycle state. Multiple states can be specified, returning on the first state. For example, --wait-for-state ACTIVE --wait-for-state INACTIVE 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({'freeform-tags': {'module': 'fusion_apps', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'fusion_apps', '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={'freeform-tags': {'module': 'fusion_apps', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'fusion_apps', 'class': 'dict(str, dict(str, object))'}}, output_type={'module': 'fusion_apps', 'class': 'EmailSubdomain'}) +@cli_util.wrap_exceptions +def create_email_subdomain(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, fusion_environment_id, marketing_brand_id, name, dns_management, certificate_management, freeform_tags, defined_tags): + + if isinstance(fusion_environment_id, six.string_types) and len(fusion_environment_id.strip()) == 0: + raise click.UsageError('Parameter --fusion-environment-id cannot be whitespace or empty string') + + if isinstance(marketing_brand_id, six.string_types) and len(marketing_brand_id.strip()) == 0: + raise click.UsageError('Parameter --marketing-brand-id cannot be whitespace or empty string') + + kwargs = {} + kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id']) + + _details = {} + _details['name'] = name + _details['dnsManagement'] = dns_management + _details['certificateManagement'] = certificate_management + + if freeform_tags is not None: + _details['freeformTags'] = cli_util.parse_json_parameter("freeform_tags", freeform_tags) + + if defined_tags is not None: + _details['definedTags'] = cli_util.parse_json_parameter("defined_tags", defined_tags) + + client = cli_util.build_client('fusion_apps', 'fusion_applications', ctx) + result = client.create_email_subdomain( + fusion_environment_id=fusion_environment_id, + marketing_brand_id=marketing_brand_id, + create_email_subdomain_details=_details, + **kwargs + ) + if wait_for_state: + + if hasattr(client, 'get_email_subdomain') and callable(getattr(client, 'get_email_subdomain')): + 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_email_subdomain(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) + + @fusion_environment_group.command(name=cli_util.override('fusion_apps.create_fusion_environment.command_name', 'create'), help=u"""Creates a new FusionEnvironment. \n[Command Reference](createFusionEnvironment)""") @cli_util.option('--display-name', required=True, help=u"""FusionEnvironment Identifier can be renamed.""") @cli_util.option('--compartment-id', required=True, help=u"""The unique identifier (OCID) of the compartment where the Fusion Environment is located.""") @@ -538,6 +630,139 @@ def create_fusion_environment_family(ctx, from_json, wait_for_state, max_wait_se cli_util.render_response(result, ctx) +@marketing_brand_group.command(name=cli_util.override('fusion_apps.create_marketing_brand.command_name', 'create'), help=u"""Creates a marketing brand for fusion environment \n[Command Reference](createMarketingBrand)""") +@cli_util.option('--fusion-environment-id', required=True, help=u"""unique FusionEnvironment identifier""") +@cli_util.option('--name', required=True, help=u"""marketing brand name for fusion environment""") +@cli_util.option('--freeform-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: `{\"bar-key\": \"value\"}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP) +@cli_util.option('--defined-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP) +@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACTIVE", "INACTIVE"]), multiple=True, help="""This operation creates, modifies or deletes a resource that has a defined lifecycle state. Specify this option to perform the action and then wait until the resource reaches a given lifecycle state. Multiple states can be specified, returning on the first state. For example, --wait-for-state ACTIVE --wait-for-state INACTIVE 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({'freeform-tags': {'module': 'fusion_apps', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'fusion_apps', '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={'freeform-tags': {'module': 'fusion_apps', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'fusion_apps', 'class': 'dict(str, dict(str, object))'}}, output_type={'module': 'fusion_apps', 'class': 'MarketingBrand'}) +@cli_util.wrap_exceptions +def create_marketing_brand(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, fusion_environment_id, name, freeform_tags, defined_tags): + + if isinstance(fusion_environment_id, six.string_types) and len(fusion_environment_id.strip()) == 0: + raise click.UsageError('Parameter --fusion-environment-id cannot be whitespace or empty string') + + kwargs = {} + kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id']) + + _details = {} + _details['name'] = name + + if freeform_tags is not None: + _details['freeformTags'] = cli_util.parse_json_parameter("freeform_tags", freeform_tags) + + if defined_tags is not None: + _details['definedTags'] = cli_util.parse_json_parameter("defined_tags", defined_tags) + + client = cli_util.build_client('fusion_apps', 'fusion_applications', ctx) + result = client.create_marketing_brand( + fusion_environment_id=fusion_environment_id, + create_marketing_brand_details=_details, + **kwargs + ) + if wait_for_state: + + if hasattr(client, 'get_marketing_brand') and callable(getattr(client, 'get_marketing_brand')): + 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_marketing_brand(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) + + +@microsite_group.command(name=cli_util.override('fusion_apps.create_microsite.command_name', 'create'), help=u"""Creates a microsite for brand \n[Command Reference](createMicrosite)""") +@cli_util.option('--fusion-environment-id', required=True, help=u"""unique FusionEnvironment identifier""") +@cli_util.option('--marketing-brand-id', required=True, help=u"""unique brand identifier""") +@cli_util.option('--name', required=True, help=u"""microsite name""") +@cli_util.option('--dns-management', required=True, help=u"""dns management type for email subdomain""") +@cli_util.option('--certificate-management', required=True, help=u"""certificate management type for email subdomain""") +@cli_util.option('--freeform-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: `{\"bar-key\": \"value\"}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP) +@cli_util.option('--defined-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP) +@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACTIVE", "INACTIVE"]), multiple=True, help="""This operation creates, modifies or deletes a resource that has a defined lifecycle state. Specify this option to perform the action and then wait until the resource reaches a given lifecycle state. Multiple states can be specified, returning on the first state. For example, --wait-for-state ACTIVE --wait-for-state INACTIVE 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({'freeform-tags': {'module': 'fusion_apps', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'fusion_apps', '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={'freeform-tags': {'module': 'fusion_apps', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'fusion_apps', 'class': 'dict(str, dict(str, object))'}}, output_type={'module': 'fusion_apps', 'class': 'Microsite'}) +@cli_util.wrap_exceptions +def create_microsite(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, fusion_environment_id, marketing_brand_id, name, dns_management, certificate_management, freeform_tags, defined_tags): + + if isinstance(fusion_environment_id, six.string_types) and len(fusion_environment_id.strip()) == 0: + raise click.UsageError('Parameter --fusion-environment-id cannot be whitespace or empty string') + + if isinstance(marketing_brand_id, six.string_types) and len(marketing_brand_id.strip()) == 0: + raise click.UsageError('Parameter --marketing-brand-id cannot be whitespace or empty string') + + kwargs = {} + kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id']) + + _details = {} + _details['name'] = name + _details['dnsManagement'] = dns_management + _details['certificateManagement'] = certificate_management + + if freeform_tags is not None: + _details['freeformTags'] = cli_util.parse_json_parameter("freeform_tags", freeform_tags) + + if defined_tags is not None: + _details['definedTags'] = cli_util.parse_json_parameter("defined_tags", defined_tags) + + client = cli_util.build_client('fusion_apps', 'fusion_applications', ctx) + result = client.create_microsite( + fusion_environment_id=fusion_environment_id, + marketing_brand_id=marketing_brand_id, + create_microsite_details=_details, + **kwargs + ) + if wait_for_state: + + if hasattr(client, 'get_microsite') and callable(getattr(client, 'get_microsite')): + 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_microsite(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) + + @create_refresh_activity_details_group.command(name=cli_util.override('fusion_apps.create_refresh_activity.command_name', 'create-refresh-activity'), help=u"""Creates a new RefreshActivity. \n[Command Reference](createRefreshActivity)""") @cli_util.option('--fusion-environment-id', required=True, help=u"""unique FusionEnvironment identifier""") @cli_util.option('--source-fusion-environment-id', required=True, help=u"""The [OCID] of the source environment""") @@ -664,6 +889,72 @@ def create_service_attachment(ctx, from_json, wait_for_state, max_wait_seconds, cli_util.render_response(result, ctx) +@email_subdomain_group.command(name=cli_util.override('fusion_apps.delete_email_subdomain.command_name', 'delete'), help=u"""Delete an email subdomain for a brand \n[Command Reference](deleteEmailSubdomain)""") +@cli_util.option('--fusion-environment-id', required=True, help=u"""unique FusionEnvironment identifier""") +@cli_util.option('--marketing-brand-id', required=True, help=u"""unique brand identifier""") +@cli_util.option('--email-subdomain-id', required=True, help=u"""unique emailSubdomain identifier""") +@cli_util.option('--if-match', help=u"""For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.""") +@cli_util.confirm_delete_option +@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED"]), multiple=True, help="""This operation asynchronously creates, modifies or deletes a resource and uses a work request to track the progress of the operation. Specify this option to perform the action and then wait until the work request reaches a certain state. Multiple states can be specified, returning on the first state. For example, --wait-for-state ACCEPTED --wait-for-state CANCELED would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.""") +@cli_util.option('--max-wait-seconds', type=click.INT, help="""The maximum time to wait for the work request to reach the state defined by --wait-for-state. Defaults to 1200 seconds.""") +@cli_util.option('--wait-interval-seconds', type=click.INT, help="""Check every --wait-interval-seconds to see whether the work request has reached the state defined by --wait-for-state. Defaults to 30 seconds.""") +@json_skeleton_utils.get_cli_json_input_option({}) +@cli_util.help_option +@click.pass_context +@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}) +@cli_util.wrap_exceptions +def delete_email_subdomain(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, fusion_environment_id, marketing_brand_id, email_subdomain_id, if_match): + + if isinstance(fusion_environment_id, six.string_types) and len(fusion_environment_id.strip()) == 0: + raise click.UsageError('Parameter --fusion-environment-id cannot be whitespace or empty string') + + if isinstance(marketing_brand_id, six.string_types) and len(marketing_brand_id.strip()) == 0: + raise click.UsageError('Parameter --marketing-brand-id cannot be whitespace or empty string') + + if isinstance(email_subdomain_id, six.string_types) and len(email_subdomain_id.strip()) == 0: + raise click.UsageError('Parameter --email-subdomain-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('fusion_apps', 'fusion_applications', ctx) + result = client.delete_email_subdomain( + fusion_environment_id=fusion_environment_id, + marketing_brand_id=marketing_brand_id, + email_subdomain_id=email_subdomain_id, + **kwargs + ) + if wait_for_state: + + if hasattr(client, 'get_work_request') and callable(getattr(client, 'get_work_request')): + try: + wait_period_kwargs = {} + if max_wait_seconds is not None: + wait_period_kwargs['max_wait_seconds'] = max_wait_seconds + if wait_interval_seconds is not None: + wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds + if 'opc-work-request-id' not in result.headers: + click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state') + cli_util.render_response(result, ctx) + return + + click.echo('Action completed. Waiting until the work request has entered state: {}'.format(wait_for_state), file=sys.stderr) + result = oci.wait_until(client, client.get_work_request(result.headers['opc-work-request-id']), 'status', wait_for_state, **wait_period_kwargs) + except oci.exceptions.MaximumWaitTimeExceeded as e: + # If we fail, we should show an error, but we should still provide the information to the customer + click.echo('Failed to wait until the work request entered the specified state. Please retrieve the work request to find its current state', file=sys.stderr) + cli_util.render_response(result, ctx) + sys.exit(2) + except Exception: + click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state', file=sys.stderr) + cli_util.render_response(result, ctx) + raise + else: + click.echo('Unable to wait for the work request to enter the specified state', file=sys.stderr) + cli_util.render_response(result, ctx) + + @fusion_environment_group.command(name=cli_util.override('fusion_apps.delete_fusion_environment.command_name', 'delete'), help=u"""Deletes the Fusion environment identified by it's OCID. \n[Command Reference](deleteFusionEnvironment)""") @cli_util.option('--fusion-environment-id', required=True, help=u"""unique FusionEnvironment identifier""") @cli_util.option('--if-match', help=u"""For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.""") @@ -837,9 +1128,9 @@ def delete_fusion_environment_family(ctx, from_json, wait_for_state, max_wait_se cli_util.render_response(result, ctx) -@refresh_activity_group.command(name=cli_util.override('fusion_apps.delete_refresh_activity.command_name', 'delete'), help=u"""Deletes a scheduled RefreshActivity resource by identifier \n[Command Reference](deleteRefreshActivity)""") +@marketing_brand_group.command(name=cli_util.override('fusion_apps.delete_marketing_brand.command_name', 'delete'), help=u"""Deletes a Marketing brand for fusion Environment \n[Command Reference](deleteMarketingBrand)""") @cli_util.option('--fusion-environment-id', required=True, help=u"""unique FusionEnvironment identifier""") -@cli_util.option('--refresh-activity-id', required=True, help=u"""The unique identifier (OCID) of the Refresh activity.""") +@cli_util.option('--marketing-brand-id', required=True, help=u"""unique brand identifier""") @cli_util.option('--if-match', help=u"""For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.""") @cli_util.confirm_delete_option @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "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.""") @@ -850,22 +1141,22 @@ def delete_fusion_environment_family(ctx, from_json, wait_for_state, max_wait_se @click.pass_context @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}) @cli_util.wrap_exceptions -def delete_refresh_activity(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, fusion_environment_id, refresh_activity_id, if_match): +def delete_marketing_brand(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, fusion_environment_id, marketing_brand_id, if_match): if isinstance(fusion_environment_id, six.string_types) and len(fusion_environment_id.strip()) == 0: raise click.UsageError('Parameter --fusion-environment-id cannot be whitespace or empty string') - if isinstance(refresh_activity_id, six.string_types) and len(refresh_activity_id.strip()) == 0: - raise click.UsageError('Parameter --refresh-activity-id cannot be whitespace or empty string') + if isinstance(marketing_brand_id, six.string_types) and len(marketing_brand_id.strip()) == 0: + raise click.UsageError('Parameter --marketing-brand-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('fusion_apps', 'fusion_applications', ctx) - result = client.delete_refresh_activity( + result = client.delete_marketing_brand( fusion_environment_id=fusion_environment_id, - refresh_activity_id=refresh_activity_id, + marketing_brand_id=marketing_brand_id, **kwargs ) if wait_for_state: @@ -898,9 +1189,10 @@ def delete_refresh_activity(ctx, from_json, wait_for_state, max_wait_seconds, wa cli_util.render_response(result, ctx) -@service_attachment_group.command(name=cli_util.override('fusion_apps.delete_service_attachment.command_name', 'delete'), help=u"""Delete a service attachment by identifier \n[Command Reference](deleteServiceAttachment)""") +@microsite_group.command(name=cli_util.override('fusion_apps.delete_microsite.command_name', 'delete'), help=u"""Delete microsite for a brand \n[Command Reference](deleteMicrosite)""") @cli_util.option('--fusion-environment-id', required=True, help=u"""unique FusionEnvironment identifier""") -@cli_util.option('--service-attachment-id', required=True, help=u"""OCID of the Service Attachment""") +@cli_util.option('--marketing-brand-id', required=True, help=u"""unique brand identifier""") +@cli_util.option('--microsite-id', required=True, help=u"""unique microsite identifier""") @cli_util.option('--if-match', help=u"""For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.""") @cli_util.confirm_delete_option @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "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.""") @@ -911,22 +1203,26 @@ def delete_refresh_activity(ctx, from_json, wait_for_state, max_wait_seconds, wa @click.pass_context @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}) @cli_util.wrap_exceptions -def delete_service_attachment(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, fusion_environment_id, service_attachment_id, if_match): +def delete_microsite(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, fusion_environment_id, marketing_brand_id, microsite_id, if_match): if isinstance(fusion_environment_id, six.string_types) and len(fusion_environment_id.strip()) == 0: raise click.UsageError('Parameter --fusion-environment-id cannot be whitespace or empty string') - if isinstance(service_attachment_id, six.string_types) and len(service_attachment_id.strip()) == 0: - raise click.UsageError('Parameter --service-attachment-id cannot be whitespace or empty string') + if isinstance(marketing_brand_id, six.string_types) and len(marketing_brand_id.strip()) == 0: + raise click.UsageError('Parameter --marketing-brand-id cannot be whitespace or empty string') + + if isinstance(microsite_id, six.string_types) and len(microsite_id.strip()) == 0: + raise click.UsageError('Parameter --microsite-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('fusion_apps', 'fusion_applications', ctx) - result = client.delete_service_attachment( + result = client.delete_microsite( fusion_environment_id=fusion_environment_id, - service_attachment_id=service_attachment_id, + marketing_brand_id=marketing_brand_id, + microsite_id=microsite_id, **kwargs ) if wait_for_state: @@ -959,22 +1255,144 @@ def delete_service_attachment(ctx, from_json, wait_for_state, max_wait_seconds, cli_util.render_response(result, ctx) -@fusion_environment_group.command(name=cli_util.override('fusion_apps.generate_extract_details.command_name', 'generate-extract-details'), help=u"""Begin the process of showing the details about where to retrieve data extract for a Fusion environment. \n[Command Reference](generateExtractDetails)""") +@refresh_activity_group.command(name=cli_util.override('fusion_apps.delete_refresh_activity.command_name', 'delete'), help=u"""Deletes a scheduled RefreshActivity resource by identifier \n[Command Reference](deleteRefreshActivity)""") @cli_util.option('--fusion-environment-id', required=True, help=u"""unique FusionEnvironment identifier""") +@cli_util.option('--refresh-activity-id', required=True, help=u"""The unique identifier (OCID) of the Refresh activity.""") +@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", "CANCELING", "CANCELED"]), multiple=True, help="""This operation asynchronously creates, modifies or deletes a resource and uses a work request to track the progress of the operation. Specify this option to perform the action and then wait until the work request reaches a certain state. Multiple states can be specified, returning on the first state. For example, --wait-for-state ACCEPTED --wait-for-state CANCELED would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.""") +@cli_util.option('--max-wait-seconds', type=click.INT, help="""The maximum time to wait for the work request to reach the state defined by --wait-for-state. Defaults to 1200 seconds.""") +@cli_util.option('--wait-interval-seconds', type=click.INT, help="""Check every --wait-interval-seconds to see whether the work request has reached the state defined by --wait-for-state. Defaults to 30 seconds.""") @json_skeleton_utils.get_cli_json_input_option({}) @cli_util.help_option @click.pass_context -@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'fusion_apps', 'class': 'ExtractDetailsCollection'}) +@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}) @cli_util.wrap_exceptions -def generate_extract_details(ctx, from_json, fusion_environment_id): +def delete_refresh_activity(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, fusion_environment_id, refresh_activity_id, if_match): if isinstance(fusion_environment_id, six.string_types) and len(fusion_environment_id.strip()) == 0: raise click.UsageError('Parameter --fusion-environment-id cannot be whitespace or empty string') + if isinstance(refresh_activity_id, six.string_types) and len(refresh_activity_id.strip()) == 0: + raise click.UsageError('Parameter --refresh-activity-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('fusion_apps', 'fusion_applications', ctx) - result = client.generate_extract_details( + result = client.delete_refresh_activity( + fusion_environment_id=fusion_environment_id, + refresh_activity_id=refresh_activity_id, + **kwargs + ) + if wait_for_state: + + if hasattr(client, 'get_work_request') and callable(getattr(client, 'get_work_request')): + try: + wait_period_kwargs = {} + if max_wait_seconds is not None: + wait_period_kwargs['max_wait_seconds'] = max_wait_seconds + if wait_interval_seconds is not None: + wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds + if 'opc-work-request-id' not in result.headers: + click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state') + cli_util.render_response(result, ctx) + return + + click.echo('Action completed. Waiting until the work request has entered state: {}'.format(wait_for_state), file=sys.stderr) + result = oci.wait_until(client, client.get_work_request(result.headers['opc-work-request-id']), 'status', wait_for_state, **wait_period_kwargs) + except oci.exceptions.MaximumWaitTimeExceeded as e: + # If we fail, we should show an error, but we should still provide the information to the customer + click.echo('Failed to wait until the work request entered the specified state. Please retrieve the work request to find its current state', file=sys.stderr) + cli_util.render_response(result, ctx) + sys.exit(2) + except Exception: + click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state', file=sys.stderr) + cli_util.render_response(result, ctx) + raise + else: + click.echo('Unable to wait for the work request to enter the specified state', file=sys.stderr) + cli_util.render_response(result, ctx) + + +@service_attachment_group.command(name=cli_util.override('fusion_apps.delete_service_attachment.command_name', 'delete'), help=u"""Delete a service attachment by identifier \n[Command Reference](deleteServiceAttachment)""") +@cli_util.option('--fusion-environment-id', required=True, help=u"""unique FusionEnvironment identifier""") +@cli_util.option('--service-attachment-id', required=True, help=u"""OCID of the Service Attachment""") +@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", "CANCELING", "CANCELED"]), multiple=True, help="""This operation asynchronously creates, modifies or deletes a resource and uses a work request to track the progress of the operation. Specify this option to perform the action and then wait until the work request reaches a certain state. Multiple states can be specified, returning on the first state. For example, --wait-for-state ACCEPTED --wait-for-state CANCELED would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.""") +@cli_util.option('--max-wait-seconds', type=click.INT, help="""The maximum time to wait for the work request to reach the state defined by --wait-for-state. Defaults to 1200 seconds.""") +@cli_util.option('--wait-interval-seconds', type=click.INT, help="""Check every --wait-interval-seconds to see whether the work request has reached the state defined by --wait-for-state. Defaults to 30 seconds.""") +@json_skeleton_utils.get_cli_json_input_option({}) +@cli_util.help_option +@click.pass_context +@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}) +@cli_util.wrap_exceptions +def delete_service_attachment(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, fusion_environment_id, service_attachment_id, if_match): + + if isinstance(fusion_environment_id, six.string_types) and len(fusion_environment_id.strip()) == 0: + raise click.UsageError('Parameter --fusion-environment-id cannot be whitespace or empty string') + + if isinstance(service_attachment_id, six.string_types) and len(service_attachment_id.strip()) == 0: + raise click.UsageError('Parameter --service-attachment-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('fusion_apps', 'fusion_applications', ctx) + result = client.delete_service_attachment( + fusion_environment_id=fusion_environment_id, + service_attachment_id=service_attachment_id, + **kwargs + ) + if wait_for_state: + + if hasattr(client, 'get_work_request') and callable(getattr(client, 'get_work_request')): + try: + wait_period_kwargs = {} + if max_wait_seconds is not None: + wait_period_kwargs['max_wait_seconds'] = max_wait_seconds + if wait_interval_seconds is not None: + wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds + if 'opc-work-request-id' not in result.headers: + click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state') + cli_util.render_response(result, ctx) + return + + click.echo('Action completed. Waiting until the work request has entered state: {}'.format(wait_for_state), file=sys.stderr) + result = oci.wait_until(client, client.get_work_request(result.headers['opc-work-request-id']), 'status', wait_for_state, **wait_period_kwargs) + except oci.exceptions.MaximumWaitTimeExceeded as e: + # If we fail, we should show an error, but we should still provide the information to the customer + click.echo('Failed to wait until the work request entered the specified state. Please retrieve the work request to find its current state', file=sys.stderr) + cli_util.render_response(result, ctx) + sys.exit(2) + except Exception: + click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state', file=sys.stderr) + cli_util.render_response(result, ctx) + raise + else: + click.echo('Unable to wait for the work request to enter the specified state', file=sys.stderr) + cli_util.render_response(result, ctx) + + +@fusion_environment_group.command(name=cli_util.override('fusion_apps.generate_extract_details.command_name', 'generate-extract-details'), help=u"""Begin the process of showing the details about where to retrieve data extract for a Fusion environment. \n[Command Reference](generateExtractDetails)""") +@cli_util.option('--fusion-environment-id', required=True, help=u"""unique FusionEnvironment identifier""") +@json_skeleton_utils.get_cli_json_input_option({}) +@cli_util.help_option +@click.pass_context +@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'fusion_apps', 'class': 'ExtractDetailsCollection'}) +@cli_util.wrap_exceptions +def generate_extract_details(ctx, from_json, fusion_environment_id): + + if isinstance(fusion_environment_id, six.string_types) and len(fusion_environment_id.strip()) == 0: + raise click.UsageError('Parameter --fusion-environment-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('fusion_apps', 'fusion_applications', ctx) + result = client.generate_extract_details( fusion_environment_id=fusion_environment_id, **kwargs ) @@ -1008,6 +1426,102 @@ def get_data_masking_activity(ctx, from_json, fusion_environment_id, data_maskin cli_util.render_response(result, ctx) +@email_subdomain_group.command(name=cli_util.override('fusion_apps.get_email_subdomain.command_name', 'get'), help=u"""Gets an email subdomain for the brand \n[Command Reference](getEmailSubdomain)""") +@cli_util.option('--fusion-environment-id', required=True, help=u"""unique FusionEnvironment identifier""") +@cli_util.option('--marketing-brand-id', required=True, help=u"""unique brand identifier""") +@cli_util.option('--email-subdomain-id', required=True, help=u"""unique emailSubdomain identifier""") +@json_skeleton_utils.get_cli_json_input_option({}) +@cli_util.help_option +@click.pass_context +@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'fusion_apps', 'class': 'EmailSubdomain'}) +@cli_util.wrap_exceptions +def get_email_subdomain(ctx, from_json, fusion_environment_id, marketing_brand_id, email_subdomain_id): + + if isinstance(fusion_environment_id, six.string_types) and len(fusion_environment_id.strip()) == 0: + raise click.UsageError('Parameter --fusion-environment-id cannot be whitespace or empty string') + + if isinstance(marketing_brand_id, six.string_types) and len(marketing_brand_id.strip()) == 0: + raise click.UsageError('Parameter --marketing-brand-id cannot be whitespace or empty string') + + if isinstance(email_subdomain_id, six.string_types) and len(email_subdomain_id.strip()) == 0: + raise click.UsageError('Parameter --email-subdomain-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('fusion_apps', 'fusion_applications', ctx) + result = client.get_email_subdomain( + fusion_environment_id=fusion_environment_id, + marketing_brand_id=marketing_brand_id, + email_subdomain_id=email_subdomain_id, + **kwargs + ) + cli_util.render_response(result, ctx) + + +@email_subdomain_group.command(name=cli_util.override('fusion_apps.get_email_subdomain_csr.command_name', 'get-email-subdomain-csr'), help=u"""Gets a CSR for email subdomain for a brand \n[Command Reference](getEmailSubdomainCsr)""") +@cli_util.option('--fusion-environment-id', required=True, help=u"""unique FusionEnvironment identifier""") +@cli_util.option('--marketing-brand-id', required=True, help=u"""unique brand identifier""") +@cli_util.option('--email-subdomain-id', required=True, help=u"""unique emailSubdomain identifier""") +@json_skeleton_utils.get_cli_json_input_option({}) +@cli_util.help_option +@click.pass_context +@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'fusion_apps', 'class': 'MarketingBrandEmailSubdomainCsr'}) +@cli_util.wrap_exceptions +def get_email_subdomain_csr(ctx, from_json, fusion_environment_id, marketing_brand_id, email_subdomain_id): + + if isinstance(fusion_environment_id, six.string_types) and len(fusion_environment_id.strip()) == 0: + raise click.UsageError('Parameter --fusion-environment-id cannot be whitespace or empty string') + + if isinstance(marketing_brand_id, six.string_types) and len(marketing_brand_id.strip()) == 0: + raise click.UsageError('Parameter --marketing-brand-id cannot be whitespace or empty string') + + if isinstance(email_subdomain_id, six.string_types) and len(email_subdomain_id.strip()) == 0: + raise click.UsageError('Parameter --email-subdomain-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('fusion_apps', 'fusion_applications', ctx) + result = client.get_email_subdomain_csr( + fusion_environment_id=fusion_environment_id, + marketing_brand_id=marketing_brand_id, + email_subdomain_id=email_subdomain_id, + **kwargs + ) + cli_util.render_response(result, ctx) + + +@email_subdomain_group.command(name=cli_util.override('fusion_apps.get_email_subdomain_dns_config.command_name', 'get-email-subdomain-dns-config'), help=u"""Get all DNS records for emailSubdomain \n[Command Reference](getEmailSubdomainDnsConfig)""") +@cli_util.option('--fusion-environment-id', required=True, help=u"""unique FusionEnvironment identifier""") +@cli_util.option('--marketing-brand-id', required=True, help=u"""unique brand identifier""") +@cli_util.option('--email-subdomain-id', required=True, help=u"""unique emailSubdomain identifier""") +@json_skeleton_utils.get_cli_json_input_option({}) +@cli_util.help_option +@click.pass_context +@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'fusion_apps', 'class': 'MarketingBrandEmailSubdomainDnsConfig'}) +@cli_util.wrap_exceptions +def get_email_subdomain_dns_config(ctx, from_json, fusion_environment_id, marketing_brand_id, email_subdomain_id): + + if isinstance(fusion_environment_id, six.string_types) and len(fusion_environment_id.strip()) == 0: + raise click.UsageError('Parameter --fusion-environment-id cannot be whitespace or empty string') + + if isinstance(marketing_brand_id, six.string_types) and len(marketing_brand_id.strip()) == 0: + raise click.UsageError('Parameter --marketing-brand-id cannot be whitespace or empty string') + + if isinstance(email_subdomain_id, six.string_types) and len(email_subdomain_id.strip()) == 0: + raise click.UsageError('Parameter --email-subdomain-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('fusion_apps', 'fusion_applications', ctx) + result = client.get_email_subdomain_dns_config( + fusion_environment_id=fusion_environment_id, + marketing_brand_id=marketing_brand_id, + email_subdomain_id=email_subdomain_id, + **kwargs + ) + cli_util.render_response(result, ctx) + + @fusion_environment_group.command(name=cli_util.override('fusion_apps.get_fusion_environment.command_name', 'get'), help=u"""Gets a FusionEnvironment by identifier \n[Command Reference](getFusionEnvironment)""") @cli_util.option('--fusion-environment-id', required=True, help=u"""unique FusionEnvironment identifier""") @json_skeleton_utils.get_cli_json_input_option({}) @@ -1118,6 +1632,97 @@ def get_fusion_environment_status(ctx, from_json, fusion_environment_id): cli_util.render_response(result, ctx) +@marketing_brand_group.command(name=cli_util.override('fusion_apps.get_marketing_brand.command_name', 'get'), help=u"""Gets a Marketing Brand by identifier \n[Command Reference](getMarketingBrand)""") +@cli_util.option('--fusion-environment-id', required=True, help=u"""unique FusionEnvironment identifier""") +@cli_util.option('--marketing-brand-id', required=True, help=u"""unique brand identifier""") +@json_skeleton_utils.get_cli_json_input_option({}) +@cli_util.help_option +@click.pass_context +@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'fusion_apps', 'class': 'MarketingBrand'}) +@cli_util.wrap_exceptions +def get_marketing_brand(ctx, from_json, fusion_environment_id, marketing_brand_id): + + if isinstance(fusion_environment_id, six.string_types) and len(fusion_environment_id.strip()) == 0: + raise click.UsageError('Parameter --fusion-environment-id cannot be whitespace or empty string') + + if isinstance(marketing_brand_id, six.string_types) and len(marketing_brand_id.strip()) == 0: + raise click.UsageError('Parameter --marketing-brand-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('fusion_apps', 'fusion_applications', ctx) + result = client.get_marketing_brand( + fusion_environment_id=fusion_environment_id, + marketing_brand_id=marketing_brand_id, + **kwargs + ) + cli_util.render_response(result, ctx) + + +@microsite_group.command(name=cli_util.override('fusion_apps.get_microsite.command_name', 'get'), help=u"""Get the microsite for the brand \n[Command Reference](getMicrosite)""") +@cli_util.option('--fusion-environment-id', required=True, help=u"""unique FusionEnvironment identifier""") +@cli_util.option('--marketing-brand-id', required=True, help=u"""unique brand identifier""") +@cli_util.option('--microsite-id', required=True, help=u"""unique microsite identifier""") +@json_skeleton_utils.get_cli_json_input_option({}) +@cli_util.help_option +@click.pass_context +@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'fusion_apps', 'class': 'Microsite'}) +@cli_util.wrap_exceptions +def get_microsite(ctx, from_json, fusion_environment_id, marketing_brand_id, microsite_id): + + if isinstance(fusion_environment_id, six.string_types) and len(fusion_environment_id.strip()) == 0: + raise click.UsageError('Parameter --fusion-environment-id cannot be whitespace or empty string') + + if isinstance(marketing_brand_id, six.string_types) and len(marketing_brand_id.strip()) == 0: + raise click.UsageError('Parameter --marketing-brand-id cannot be whitespace or empty string') + + if isinstance(microsite_id, six.string_types) and len(microsite_id.strip()) == 0: + raise click.UsageError('Parameter --microsite-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('fusion_apps', 'fusion_applications', ctx) + result = client.get_microsite( + fusion_environment_id=fusion_environment_id, + marketing_brand_id=marketing_brand_id, + microsite_id=microsite_id, + **kwargs + ) + cli_util.render_response(result, ctx) + + +@microsite_group.command(name=cli_util.override('fusion_apps.get_microsite_dns_config.command_name', 'get-microsite-dns-config'), help=u"""Get DNS records for microsite \n[Command Reference](getMicrositeDnsConfig)""") +@cli_util.option('--fusion-environment-id', required=True, help=u"""unique FusionEnvironment identifier""") +@cli_util.option('--marketing-brand-id', required=True, help=u"""unique brand identifier""") +@cli_util.option('--microsite-id', required=True, help=u"""unique microsite identifier""") +@json_skeleton_utils.get_cli_json_input_option({}) +@cli_util.help_option +@click.pass_context +@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'fusion_apps', 'class': 'MarketingBrandMicrositeDnsConfig'}) +@cli_util.wrap_exceptions +def get_microsite_dns_config(ctx, from_json, fusion_environment_id, marketing_brand_id, microsite_id): + + if isinstance(fusion_environment_id, six.string_types) and len(fusion_environment_id.strip()) == 0: + raise click.UsageError('Parameter --fusion-environment-id cannot be whitespace or empty string') + + if isinstance(marketing_brand_id, six.string_types) and len(marketing_brand_id.strip()) == 0: + raise click.UsageError('Parameter --marketing-brand-id cannot be whitespace or empty string') + + if isinstance(microsite_id, six.string_types) and len(microsite_id.strip()) == 0: + raise click.UsageError('Parameter --microsite-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('fusion_apps', 'fusion_applications', ctx) + result = client.get_microsite_dns_config( + fusion_environment_id=fusion_environment_id, + marketing_brand_id=marketing_brand_id, + microsite_id=microsite_id, + **kwargs + ) + cli_util.render_response(result, ctx) + + @refresh_activity_group.command(name=cli_util.override('fusion_apps.get_refresh_activity.command_name', 'get'), help=u"""Gets a RefreshActivity by identifier \n[Command Reference](getRefreshActivity)""") @cli_util.option('--fusion-environment-id', required=True, help=u"""unique FusionEnvironment identifier""") @cli_util.option('--refresh-activity-id', required=True, help=u"""The unique identifier (OCID) of the Refresh activity.""") @@ -1356,45 +1961,118 @@ def list_data_masking_activities(ctx, from_json, all_pages, page_size, fusion_en cli_util.render_response(result, ctx) -@fusion_environment_family_group.command(name=cli_util.override('fusion_apps.list_fusion_environment_families.command_name', 'list'), help=u"""Returns a list of FusionEnvironmentFamilies. \n[Command Reference](listFusionEnvironmentFamilies)""") -@cli_util.option('--compartment-id', required=True, help=u"""The ID of the compartment in which to list resources.""") -@cli_util.option('--fusion-environment-family-id', help=u"""The ID of the fusion environment family in which to list resources.""") -@cli_util.option('--display-name', help=u"""A filter to return only resources that match the entire display name given.""") -@cli_util.option('--lifecycle-state', type=custom_types.CliCaseInsensitiveChoice(["CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED", "FAILED"]), help=u"""A filter that returns all resources that match the specified lifecycle state.""") +@email_subdomain_group.command(name=cli_util.override('fusion_apps.list_email_subdomains.command_name', 'list'), help=u"""Returns a list of email subdomains for a brand \n[Command Reference](listEmailSubdomains)""") +@cli_util.option('--fusion-environment-id', required=True, help=u"""unique FusionEnvironment identifier""") +@cli_util.option('--marketing-brand-id', required=True, help=u"""unique brand identifier""") +@cli_util.option('--email-subdomain-id', help=u"""unique emailSubdomain identifier""") +@cli_util.option('--name', help=u"""A filter to return only resources that match the entire name given.""") +@cli_util.option('--lifecycle-state', type=custom_types.CliCaseInsensitiveChoice(["ACTIVE", "INACTIVE"]), help=u"""A filter that returns all resources that match the specified status""") +@cli_util.option('--sort-order', type=custom_types.CliCaseInsensitiveChoice(["ASC", "DESC"]), help=u"""The sort order to use, either 'asc' or 'desc'.""") +@cli_util.option('--sort-by', type=custom_types.CliCaseInsensitiveChoice(["TIME_CREATED", "NAME", "ID"]), help=u"""The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for name is ascending. If no value is specified timeCreated is default.""") @cli_util.option('--limit', type=click.INT, help=u"""The maximum number of items to return.""") @cli_util.option('--page', help=u"""The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call.""") -@cli_util.option('--sort-order', type=custom_types.CliCaseInsensitiveChoice(["ASC", "DESC"]), help=u"""The sort order to use, either 'asc' or 'desc'.""") -@cli_util.option('--sort-by', type=custom_types.CliCaseInsensitiveChoice(["TIME_CREATED", "DISPLAY_NAME"]), help=u"""The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. If no value is specified timeCreated is default.""") @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': 'fusion_apps', 'class': 'FusionEnvironmentFamilyCollection'}) +@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'fusion_apps', 'class': 'EmailSubdomainCollection'}) @cli_util.wrap_exceptions -def list_fusion_environment_families(ctx, from_json, all_pages, page_size, compartment_id, fusion_environment_family_id, display_name, lifecycle_state, limit, page, sort_order, sort_by): +def list_email_subdomains(ctx, from_json, all_pages, page_size, fusion_environment_id, marketing_brand_id, email_subdomain_id, name, lifecycle_state, sort_order, sort_by, limit, page): if all_pages and limit: raise click.UsageError('If you provide the --all option you cannot provide the --limit option') + if isinstance(fusion_environment_id, six.string_types) and len(fusion_environment_id.strip()) == 0: + raise click.UsageError('Parameter --fusion-environment-id cannot be whitespace or empty string') + + if isinstance(marketing_brand_id, six.string_types) and len(marketing_brand_id.strip()) == 0: + raise click.UsageError('Parameter --marketing-brand-id cannot be whitespace or empty string') + kwargs = {} - if fusion_environment_family_id is not None: - kwargs['fusion_environment_family_id'] = fusion_environment_family_id - if display_name is not None: - kwargs['display_name'] = display_name + if email_subdomain_id is not None: + kwargs['email_subdomain_id'] = email_subdomain_id + if name is not None: + kwargs['name'] = name 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 if sort_order is not None: kwargs['sort_order'] = sort_order if sort_by is not None: kwargs['sort_by'] = sort_by - kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id']) - client = cli_util.build_client('fusion_apps', 'fusion_applications', ctx) - if all_pages: + 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('fusion_apps', 'fusion_applications', ctx) + if all_pages: + if page_size: + kwargs['limit'] = page_size + + result = cli_util.list_call_get_all_results( + client.list_email_subdomains, + fusion_environment_id=fusion_environment_id, + marketing_brand_id=marketing_brand_id, + **kwargs + ) + elif limit is not None: + result = cli_util.list_call_get_up_to_limit( + client.list_email_subdomains, + limit, + page_size, + fusion_environment_id=fusion_environment_id, + marketing_brand_id=marketing_brand_id, + **kwargs + ) + else: + result = client.list_email_subdomains( + fusion_environment_id=fusion_environment_id, + marketing_brand_id=marketing_brand_id, + **kwargs + ) + cli_util.render_response(result, ctx) + + +@fusion_environment_family_group.command(name=cli_util.override('fusion_apps.list_fusion_environment_families.command_name', 'list'), help=u"""Returns a list of FusionEnvironmentFamilies. \n[Command Reference](listFusionEnvironmentFamilies)""") +@cli_util.option('--compartment-id', required=True, help=u"""The ID of the compartment in which to list resources.""") +@cli_util.option('--fusion-environment-family-id', help=u"""The ID of the fusion environment family in which to list resources.""") +@cli_util.option('--display-name', help=u"""A filter to return only resources that match the entire display name given.""") +@cli_util.option('--lifecycle-state', type=custom_types.CliCaseInsensitiveChoice(["CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED", "FAILED"]), help=u"""A filter that returns all resources that match the specified lifecycle state.""") +@cli_util.option('--limit', type=click.INT, help=u"""The maximum number of items to return.""") +@cli_util.option('--page', help=u"""The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call.""") +@cli_util.option('--sort-order', type=custom_types.CliCaseInsensitiveChoice(["ASC", "DESC"]), help=u"""The sort order to use, either 'asc' or 'desc'.""") +@cli_util.option('--sort-by', type=custom_types.CliCaseInsensitiveChoice(["TIME_CREATED", "DISPLAY_NAME"]), help=u"""The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. If no value is specified timeCreated is default.""") +@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': 'fusion_apps', 'class': 'FusionEnvironmentFamilyCollection'}) +@cli_util.wrap_exceptions +def list_fusion_environment_families(ctx, from_json, all_pages, page_size, compartment_id, fusion_environment_family_id, display_name, lifecycle_state, limit, page, sort_order, sort_by): + + if all_pages and limit: + raise click.UsageError('If you provide the --all option you cannot provide the --limit option') + + kwargs = {} + if fusion_environment_family_id is not None: + kwargs['fusion_environment_family_id'] = fusion_environment_family_id + if display_name is not None: + kwargs['display_name'] = display_name + 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 + if sort_order is not None: + kwargs['sort_order'] = sort_order + if sort_by is not None: + kwargs['sort_by'] = sort_by + kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id']) + client = cli_util.build_client('fusion_apps', 'fusion_applications', ctx) + if all_pages: if page_size: kwargs['limit'] = page_size @@ -1482,6 +2160,145 @@ def list_fusion_environments(ctx, from_json, all_pages, page_size, compartment_i cli_util.render_response(result, ctx) +@marketing_brand_group.command(name=cli_util.override('fusion_apps.list_marketing_brands.command_name', 'list'), help=u"""Returns a list of marketing brands \n[Command Reference](listMarketingBrands)""") +@cli_util.option('--fusion-environment-id', required=True, help=u"""unique FusionEnvironment identifier""") +@cli_util.option('--marketing-brand-id', help=u"""unique brand identifier""") +@cli_util.option('--name', help=u"""A filter to return only resources that match the entire name given.""") +@cli_util.option('--lifecycle-state', type=custom_types.CliCaseInsensitiveChoice(["ACTIVE", "INACTIVE"]), help=u"""A filter that returns all resources that match the specified status""") +@cli_util.option('--limit', type=click.INT, help=u"""The maximum number of items to return.""") +@cli_util.option('--page', help=u"""The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call.""") +@cli_util.option('--sort-order', type=custom_types.CliCaseInsensitiveChoice(["ASC", "DESC"]), help=u"""The sort order to use, either 'asc' or 'desc'.""") +@cli_util.option('--sort-by', type=custom_types.CliCaseInsensitiveChoice(["TIME_CREATED", "NAME", "ID"]), help=u"""The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for name is ascending. If no value is specified timeCreated is default.""") +@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': 'fusion_apps', 'class': 'MarketingBrandCollection'}) +@cli_util.wrap_exceptions +def list_marketing_brands(ctx, from_json, all_pages, page_size, fusion_environment_id, marketing_brand_id, name, lifecycle_state, limit, page, sort_order, sort_by): + + if all_pages and limit: + raise click.UsageError('If you provide the --all option you cannot provide the --limit option') + + if isinstance(fusion_environment_id, six.string_types) and len(fusion_environment_id.strip()) == 0: + raise click.UsageError('Parameter --fusion-environment-id cannot be whitespace or empty string') + + kwargs = {} + if marketing_brand_id is not None: + kwargs['marketing_brand_id'] = marketing_brand_id + if name is not None: + kwargs['name'] = name + 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 + if sort_order is not None: + kwargs['sort_order'] = sort_order + if sort_by is not None: + kwargs['sort_by'] = sort_by + kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id']) + client = cli_util.build_client('fusion_apps', 'fusion_applications', ctx) + if all_pages: + if page_size: + kwargs['limit'] = page_size + + result = cli_util.list_call_get_all_results( + client.list_marketing_brands, + fusion_environment_id=fusion_environment_id, + **kwargs + ) + elif limit is not None: + result = cli_util.list_call_get_up_to_limit( + client.list_marketing_brands, + limit, + page_size, + fusion_environment_id=fusion_environment_id, + **kwargs + ) + else: + result = client.list_marketing_brands( + fusion_environment_id=fusion_environment_id, + **kwargs + ) + cli_util.render_response(result, ctx) + + +@microsite_group.command(name=cli_util.override('fusion_apps.list_microsites.command_name', 'list'), help=u"""Returns a list of microsites \n[Command Reference](listMicrosites)""") +@cli_util.option('--fusion-environment-id', required=True, help=u"""unique FusionEnvironment identifier""") +@cli_util.option('--marketing-brand-id', required=True, help=u"""unique brand identifier""") +@cli_util.option('--microsite-id', help=u"""unique microsite identifier""") +@cli_util.option('--name', help=u"""A filter to return only resources that match the entire name given.""") +@cli_util.option('--lifecycle-state', type=custom_types.CliCaseInsensitiveChoice(["ACTIVE", "INACTIVE"]), help=u"""A filter that returns all resources that match the specified status""") +@cli_util.option('--sort-order', type=custom_types.CliCaseInsensitiveChoice(["ASC", "DESC"]), help=u"""The sort order to use, either 'asc' or 'desc'.""") +@cli_util.option('--sort-by', type=custom_types.CliCaseInsensitiveChoice(["TIME_CREATED", "NAME", "ID"]), help=u"""The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for name is ascending. If no value is specified timeCreated is default.""") +@cli_util.option('--limit', type=click.INT, help=u"""The maximum number of items to return.""") +@cli_util.option('--page', help=u"""The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call.""") +@cli_util.option('--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': 'fusion_apps', 'class': 'MicrositeCollection'}) +@cli_util.wrap_exceptions +def list_microsites(ctx, from_json, all_pages, page_size, fusion_environment_id, marketing_brand_id, microsite_id, name, lifecycle_state, sort_order, sort_by, limit, page): + + if all_pages and limit: + raise click.UsageError('If you provide the --all option you cannot provide the --limit option') + + if isinstance(fusion_environment_id, six.string_types) and len(fusion_environment_id.strip()) == 0: + raise click.UsageError('Parameter --fusion-environment-id cannot be whitespace or empty string') + + if isinstance(marketing_brand_id, six.string_types) and len(marketing_brand_id.strip()) == 0: + raise click.UsageError('Parameter --marketing-brand-id cannot be whitespace or empty string') + + kwargs = {} + if microsite_id is not None: + kwargs['microsite_id'] = microsite_id + if name is not None: + kwargs['name'] = name + if lifecycle_state is not None: + kwargs['lifecycle_state'] = lifecycle_state + if sort_order is not None: + kwargs['sort_order'] = sort_order + if sort_by is not None: + kwargs['sort_by'] = sort_by + 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('fusion_apps', 'fusion_applications', ctx) + if all_pages: + if page_size: + kwargs['limit'] = page_size + + result = cli_util.list_call_get_all_results( + client.list_microsites, + fusion_environment_id=fusion_environment_id, + marketing_brand_id=marketing_brand_id, + **kwargs + ) + elif limit is not None: + result = cli_util.list_call_get_up_to_limit( + client.list_microsites, + limit, + page_size, + fusion_environment_id=fusion_environment_id, + marketing_brand_id=marketing_brand_id, + **kwargs + ) + else: + result = client.list_microsites( + fusion_environment_id=fusion_environment_id, + marketing_brand_id=marketing_brand_id, + **kwargs + ) + cli_util.render_response(result, ctx) + + @refresh_activity_group.command(name=cli_util.override('fusion_apps.list_refresh_activities.command_name', 'list'), help=u"""Returns a list of RefreshActivities. \n[Command Reference](listRefreshActivities)""") @cli_util.option('--fusion-environment-id', required=True, help=u"""unique FusionEnvironment identifier""") @cli_util.option('--display-name', help=u"""A filter to return only resources that match the entire display name given.""") @@ -1926,6 +2743,63 @@ def list_work_requests(ctx, from_json, all_pages, page_size, compartment_id, sta cli_util.render_response(result, ctx) +@email_subdomain_group.command(name=cli_util.override('fusion_apps.request_email_subdomain_csr.command_name', 'request-email-subdomain-csr'), help=u"""Request Email Subdomain CSR \n[Command Reference](requestEmailSubdomainCsr)""") +@cli_util.option('--fusion-environment-id', required=True, help=u"""unique FusionEnvironment identifier""") +@cli_util.option('--marketing-brand-id', required=True, help=u"""unique brand identifier""") +@cli_util.option('--email-subdomain-id', required=True, help=u"""unique emailSubdomain identifier""") +@cli_util.option('--common-name', required=True, help=u"""fully qualified host name""") +@cli_util.option('--organization-name', required=True, help=u"""company name""") +@cli_util.option('--organization-unit', required=True, help=u"""company section""") +@cli_util.option('--locality', required=True, help=u"""city""") +@cli_util.option('--state', required=True, help=u"""state or province""") +@cli_util.option('--country', required=True, help=u"""country name""") +@cli_util.option('--email-address', required=True, help=u"""email address""") +@cli_util.option('--sans', help=u"""subject alternative names, comma separated""") +@cli_util.option('--if-match', help=u"""For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.""") +@json_skeleton_utils.get_cli_json_input_option({}) +@cli_util.help_option +@click.pass_context +@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'fusion_apps', 'class': 'MarketingBrandEmailSubdomainCsr'}) +@cli_util.wrap_exceptions +def request_email_subdomain_csr(ctx, from_json, fusion_environment_id, marketing_brand_id, email_subdomain_id, common_name, organization_name, organization_unit, locality, state, country, email_address, sans, if_match): + + if isinstance(fusion_environment_id, six.string_types) and len(fusion_environment_id.strip()) == 0: + raise click.UsageError('Parameter --fusion-environment-id cannot be whitespace or empty string') + + if isinstance(marketing_brand_id, six.string_types) and len(marketing_brand_id.strip()) == 0: + raise click.UsageError('Parameter --marketing-brand-id cannot be whitespace or empty string') + + if isinstance(email_subdomain_id, six.string_types) and len(email_subdomain_id.strip()) == 0: + raise click.UsageError('Parameter --email-subdomain-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['commonName'] = common_name + _details['organizationName'] = organization_name + _details['organizationUnit'] = organization_unit + _details['locality'] = locality + _details['state'] = state + _details['country'] = country + _details['emailAddress'] = email_address + + if sans is not None: + _details['sans'] = sans + + client = cli_util.build_client('fusion_apps', 'fusion_applications', ctx) + result = client.request_email_subdomain_csr( + fusion_environment_id=fusion_environment_id, + marketing_brand_id=marketing_brand_id, + email_subdomain_id=email_subdomain_id, + request_email_subdomain_csr_details=_details, + **kwargs + ) + cli_util.render_response(result, ctx) + + @fusion_environment_group.command(name=cli_util.override('fusion_apps.reset_fusion_environment_password.command_name', 'reset-fusion-environment-password'), help=u"""Reset FusionEnvironment admin password. This API will be deprecated on Mon, 15 Jan 2024 01:00:00 GMT. Users can reset password themselves, FAaaS will no longer provide an API for this. \n[Command Reference](resetFusionEnvironmentPassword)""") @cli_util.option('--password', required=True, help=u"""Admin password""") @cli_util.option('--fusion-environment-id', required=True, help=u"""unique FusionEnvironment identifier""") @@ -1992,38 +2866,35 @@ def reset_fusion_environment_password(ctx, from_json, wait_for_state, max_wait_s cli_util.render_response(result, ctx) -@fusion_environment_group.command(name=cli_util.override('fusion_apps.update_fusion_environment.command_name', 'update'), help=u"""Updates the FusionEnvironment \n[Command Reference](updateFusionEnvironment)""") +@email_subdomain_group.command(name=cli_util.override('fusion_apps.update_email_subdomain.command_name', 'update'), help=u"""Updates an email subdomain \n[Command Reference](updateEmailSubdomain)""") @cli_util.option('--fusion-environment-id', required=True, help=u"""unique FusionEnvironment identifier""") -@cli_util.option('--display-name', help=u"""FusionEnvironment Identifier, can be renamed""") -@cli_util.option('--kms-key-id', help=u"""byok kms keyId""") -@cli_util.option('--maintenance-policy', type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP) -@cli_util.option('--additional-language-packs', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Language packs""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP) -@cli_util.option('--is-i-pv6-dual-stack-enabled', type=click.BOOL, help=u"""Enable IPv4/IPv6 dual stack support for the environment (where available). Setting to true will assign an IPv6 address to the environment in addition to an IPv4 address.""") -@cli_util.option('--rules', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Network access control rules to limit internet traffic that can access the environment. For more information, see [AllowRule Reference]. - -This option is a JSON list with items of type Rule. For documentation on Rule please see our API reference: https://docs.oracle.com/en-us/iaas/api/#/en/fusionapplications/20211201/datatypes/Rule.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP) -@cli_util.option('--additional-egress-rules', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Additional egress rules that should be applied to the environment. Some standard ports are open for general use; see [Securing Network Access to a Fusion Applications Environment][iaas/Content/fusion-applications/plan-environment.htm#internet-cache]. If access to a non-standard port is required, however, they can be listed here. - -This option is a JSON list with items of type AdditionalEgressRule. For documentation on AdditionalEgressRule please see our API reference: https://docs.oracle.com/en-us/iaas/api/#/en/fusionapplications/20211201/datatypes/AdditionalEgressRule.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP) +@cli_util.option('--marketing-brand-id', required=True, help=u"""unique brand identifier""") +@cli_util.option('--email-subdomain-id', required=True, help=u"""unique emailSubdomain identifier""") @cli_util.option('--freeform-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: `{\"bar-key\": \"value\"}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP) @cli_util.option('--defined-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP) @cli_util.option('--if-match', help=u"""For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.""") @cli_util.option('--force', help="""Perform update without prompting for confirmation.""", is_flag=True) -@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED"]), 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({'maintenance-policy': {'module': 'fusion_apps', 'class': 'MaintenancePolicy'}, 'additional-language-packs': {'module': 'fusion_apps', 'class': 'list[string]'}, 'rules': {'module': 'fusion_apps', 'class': 'list[Rule]'}, 'additional-egress-rules': {'module': 'fusion_apps', 'class': 'list[AdditionalEgressRule]'}, 'freeform-tags': {'module': 'fusion_apps', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'fusion_apps', 'class': 'dict(str, dict(str, object))'}}) +@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACTIVE", "INACTIVE"]), multiple=True, help="""This operation creates, modifies or deletes a resource that has a defined lifecycle state. Specify this option to perform the action and then wait until the resource reaches a given lifecycle state. Multiple states can be specified, returning on the first state. For example, --wait-for-state ACTIVE --wait-for-state INACTIVE 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({'freeform-tags': {'module': 'fusion_apps', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'fusion_apps', '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={'maintenance-policy': {'module': 'fusion_apps', 'class': 'MaintenancePolicy'}, 'additional-language-packs': {'module': 'fusion_apps', 'class': 'list[string]'}, 'rules': {'module': 'fusion_apps', 'class': 'list[Rule]'}, 'additional-egress-rules': {'module': 'fusion_apps', 'class': 'list[AdditionalEgressRule]'}, 'freeform-tags': {'module': 'fusion_apps', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'fusion_apps', 'class': 'dict(str, dict(str, object))'}}) +@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'freeform-tags': {'module': 'fusion_apps', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'fusion_apps', 'class': 'dict(str, dict(str, object))'}}, output_type={'module': 'fusion_apps', 'class': 'EmailSubdomain'}) @cli_util.wrap_exceptions -def update_fusion_environment(ctx, from_json, force, wait_for_state, max_wait_seconds, wait_interval_seconds, fusion_environment_id, display_name, kms_key_id, maintenance_policy, additional_language_packs, is_i_pv6_dual_stack_enabled, rules, additional_egress_rules, freeform_tags, defined_tags, if_match): +def update_email_subdomain(ctx, from_json, force, wait_for_state, max_wait_seconds, wait_interval_seconds, fusion_environment_id, marketing_brand_id, email_subdomain_id, freeform_tags, defined_tags, if_match): if isinstance(fusion_environment_id, six.string_types) and len(fusion_environment_id.strip()) == 0: raise click.UsageError('Parameter --fusion-environment-id cannot be whitespace or empty string') + + if isinstance(marketing_brand_id, six.string_types) and len(marketing_brand_id.strip()) == 0: + raise click.UsageError('Parameter --marketing-brand-id cannot be whitespace or empty string') + + if isinstance(email_subdomain_id, six.string_types) and len(email_subdomain_id.strip()) == 0: + raise click.UsageError('Parameter --email-subdomain-id cannot be whitespace or empty string') if not force: - if maintenance_policy or additional_language_packs or rules or additional_egress_rules or freeform_tags or defined_tags: - if not click.confirm("WARNING: Updates to maintenance-policy and additional-language-packs and rules and additional-egress-rules and freeform-tags and defined-tags will replace any existing values. Are you sure you want to continue?"): + if freeform_tags or defined_tags: + if not click.confirm("WARNING: Updates to freeform-tags and defined-tags will replace any existing values. Are you sure you want to continue?"): ctx.abort() kwargs = {} @@ -2033,27 +2904,6 @@ def update_fusion_environment(ctx, from_json, force, wait_for_state, max_wait_se _details = {} - if display_name is not None: - _details['displayName'] = display_name - - if kms_key_id is not None: - _details['kmsKeyId'] = kms_key_id - - if maintenance_policy is not None: - _details['maintenancePolicy'] = cli_util.parse_json_parameter("maintenance_policy", maintenance_policy) - - if additional_language_packs is not None: - _details['additionalLanguagePacks'] = cli_util.parse_json_parameter("additional_language_packs", additional_language_packs) - - if is_i_pv6_dual_stack_enabled is not None: - _details['isIPv6DualStackEnabled'] = is_i_pv6_dual_stack_enabled - - if rules is not None: - _details['rules'] = cli_util.parse_json_parameter("rules", rules) - - if additional_egress_rules is not None: - _details['additionalEgressRules'] = cli_util.parse_json_parameter("additional_egress_rules", additional_egress_rules) - if freeform_tags is not None: _details['freeformTags'] = cli_util.parse_json_parameter("freeform_tags", freeform_tags) @@ -2061,30 +2911,132 @@ def update_fusion_environment(ctx, from_json, force, wait_for_state, max_wait_se _details['definedTags'] = cli_util.parse_json_parameter("defined_tags", defined_tags) client = cli_util.build_client('fusion_apps', 'fusion_applications', ctx) - result = client.update_fusion_environment( + result = client.update_email_subdomain( fusion_environment_id=fusion_environment_id, - update_fusion_environment_details=_details, + marketing_brand_id=marketing_brand_id, + email_subdomain_id=email_subdomain_id, + update_email_subdomain_details=_details, **kwargs ) if wait_for_state: - if hasattr(client, 'get_work_request') and callable(getattr(client, 'get_work_request')): + if hasattr(client, 'get_email_subdomain') and callable(getattr(client, 'get_email_subdomain')): try: wait_period_kwargs = {} if max_wait_seconds is not None: wait_period_kwargs['max_wait_seconds'] = max_wait_seconds if wait_interval_seconds is not None: wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds - if 'opc-work-request-id' not in result.headers: - click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state') - cli_util.render_response(result, ctx) - return - click.echo('Action completed. Waiting until the work request has entered state: {}'.format(wait_for_state), file=sys.stderr) - result = oci.wait_until(client, client.get_work_request(result.headers['opc-work-request-id']), 'status', wait_for_state, **wait_period_kwargs) + 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_email_subdomain(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 work request entered the specified state. Outputting last known resource state', file=sys.stderr) + 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) + + +@fusion_environment_group.command(name=cli_util.override('fusion_apps.update_fusion_environment.command_name', 'update'), help=u"""Updates the FusionEnvironment \n[Command Reference](updateFusionEnvironment)""") +@cli_util.option('--fusion-environment-id', required=True, help=u"""unique FusionEnvironment identifier""") +@cli_util.option('--display-name', help=u"""FusionEnvironment Identifier, can be renamed""") +@cli_util.option('--kms-key-id', help=u"""byok kms keyId""") +@cli_util.option('--maintenance-policy', type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP) +@cli_util.option('--additional-language-packs', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Language packs""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP) +@cli_util.option('--is-i-pv6-dual-stack-enabled', type=click.BOOL, help=u"""Enable IPv4/IPv6 dual stack support for the environment (where available). Setting to true will assign an IPv6 address to the environment in addition to an IPv4 address.""") +@cli_util.option('--rules', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Network access control rules to limit internet traffic that can access the environment. For more information, see [AllowRule Reference]. + +This option is a JSON list with items of type Rule. For documentation on Rule please see our API reference: https://docs.oracle.com/en-us/iaas/api/#/en/fusionapplications/20211201/datatypes/Rule.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP) +@cli_util.option('--additional-egress-rules', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Additional egress rules that should be applied to the environment. Some standard ports are open for general use; see [Securing Network Access to a Fusion Applications Environment][iaas/Content/fusion-applications/plan-environment.htm#internet-cache]. If access to a non-standard port is required, however, they can be listed here. + +This option is a JSON list with items of type AdditionalEgressRule. For documentation on AdditionalEgressRule please see our API reference: https://docs.oracle.com/en-us/iaas/api/#/en/fusionapplications/20211201/datatypes/AdditionalEgressRule.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP) +@cli_util.option('--freeform-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: `{\"bar-key\": \"value\"}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP) +@cli_util.option('--defined-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP) +@cli_util.option('--if-match', help=u"""For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.""") +@cli_util.option('--force', help="""Perform update without prompting for confirmation.""", is_flag=True) +@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED"]), 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({'maintenance-policy': {'module': 'fusion_apps', 'class': 'MaintenancePolicy'}, 'additional-language-packs': {'module': 'fusion_apps', 'class': 'list[string]'}, 'rules': {'module': 'fusion_apps', 'class': 'list[Rule]'}, 'additional-egress-rules': {'module': 'fusion_apps', 'class': 'list[AdditionalEgressRule]'}, 'freeform-tags': {'module': 'fusion_apps', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'fusion_apps', '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={'maintenance-policy': {'module': 'fusion_apps', 'class': 'MaintenancePolicy'}, 'additional-language-packs': {'module': 'fusion_apps', 'class': 'list[string]'}, 'rules': {'module': 'fusion_apps', 'class': 'list[Rule]'}, 'additional-egress-rules': {'module': 'fusion_apps', 'class': 'list[AdditionalEgressRule]'}, 'freeform-tags': {'module': 'fusion_apps', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'fusion_apps', 'class': 'dict(str, dict(str, object))'}}) +@cli_util.wrap_exceptions +def update_fusion_environment(ctx, from_json, force, wait_for_state, max_wait_seconds, wait_interval_seconds, fusion_environment_id, display_name, kms_key_id, maintenance_policy, additional_language_packs, is_i_pv6_dual_stack_enabled, rules, additional_egress_rules, freeform_tags, defined_tags, if_match): + + if isinstance(fusion_environment_id, six.string_types) and len(fusion_environment_id.strip()) == 0: + raise click.UsageError('Parameter --fusion-environment-id cannot be whitespace or empty string') + if not force: + if maintenance_policy or additional_language_packs or rules or additional_egress_rules or freeform_tags or defined_tags: + if not click.confirm("WARNING: Updates to maintenance-policy and additional-language-packs and rules and additional-egress-rules and freeform-tags and defined-tags will replace any existing values. Are you sure you want to continue?"): + ctx.abort() + + kwargs = {} + if if_match is not None: + kwargs['if_match'] = if_match + kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id']) + + _details = {} + + if display_name is not None: + _details['displayName'] = display_name + + if kms_key_id is not None: + _details['kmsKeyId'] = kms_key_id + + if maintenance_policy is not None: + _details['maintenancePolicy'] = cli_util.parse_json_parameter("maintenance_policy", maintenance_policy) + + if additional_language_packs is not None: + _details['additionalLanguagePacks'] = cli_util.parse_json_parameter("additional_language_packs", additional_language_packs) + + if is_i_pv6_dual_stack_enabled is not None: + _details['isIPv6DualStackEnabled'] = is_i_pv6_dual_stack_enabled + + if rules is not None: + _details['rules'] = cli_util.parse_json_parameter("rules", rules) + + if additional_egress_rules is not None: + _details['additionalEgressRules'] = cli_util.parse_json_parameter("additional_egress_rules", additional_egress_rules) + + if freeform_tags is not None: + _details['freeformTags'] = cli_util.parse_json_parameter("freeform_tags", freeform_tags) + + if defined_tags is not None: + _details['definedTags'] = cli_util.parse_json_parameter("defined_tags", defined_tags) + + client = cli_util.build_client('fusion_apps', 'fusion_applications', ctx) + result = client.update_fusion_environment( + fusion_environment_id=fusion_environment_id, + update_fusion_environment_details=_details, + **kwargs + ) + if wait_for_state: + + if hasattr(client, 'get_work_request') and callable(getattr(client, 'get_work_request')): + try: + wait_period_kwargs = {} + if max_wait_seconds is not None: + wait_period_kwargs['max_wait_seconds'] = max_wait_seconds + if wait_interval_seconds is not None: + wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds + if 'opc-work-request-id' not in result.headers: + click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state') + cli_util.render_response(result, ctx) + return + + click.echo('Action completed. Waiting until the work request has entered state: {}'.format(wait_for_state), file=sys.stderr) + result = oci.wait_until(client, client.get_work_request(result.headers['opc-work-request-id']), 'status', wait_for_state, **wait_period_kwargs) + except oci.exceptions.MaximumWaitTimeExceeded as e: + # If we fail, we should show an error, but we should still provide the information to the customer + click.echo('Failed to wait until the work request entered the specified state. Outputting last known resource state', file=sys.stderr) cli_util.render_response(result, ctx) sys.exit(2) except Exception: @@ -2180,6 +3132,157 @@ def update_fusion_environment_family(ctx, from_json, force, wait_for_state, max_ cli_util.render_response(result, ctx) +@marketing_brand_group.command(name=cli_util.override('fusion_apps.update_marketing_brand.command_name', 'update'), help=u"""Updates a Marketing Brand \n[Command Reference](updateMarketingBrand)""") +@cli_util.option('--fusion-environment-id', required=True, help=u"""unique FusionEnvironment identifier""") +@cli_util.option('--marketing-brand-id', required=True, help=u"""unique brand identifier""") +@cli_util.option('--freeform-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: `{\"bar-key\": \"value\"}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP) +@cli_util.option('--defined-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP) +@cli_util.option('--if-match', help=u"""For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.""") +@cli_util.option('--force', help="""Perform update without prompting for confirmation.""", is_flag=True) +@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACTIVE", "INACTIVE"]), multiple=True, help="""This operation creates, modifies or deletes a resource that has a defined lifecycle state. Specify this option to perform the action and then wait until the resource reaches a given lifecycle state. Multiple states can be specified, returning on the first state. For example, --wait-for-state ACTIVE --wait-for-state INACTIVE 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({'freeform-tags': {'module': 'fusion_apps', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'fusion_apps', '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={'freeform-tags': {'module': 'fusion_apps', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'fusion_apps', 'class': 'dict(str, dict(str, object))'}}, output_type={'module': 'fusion_apps', 'class': 'MarketingBrand'}) +@cli_util.wrap_exceptions +def update_marketing_brand(ctx, from_json, force, wait_for_state, max_wait_seconds, wait_interval_seconds, fusion_environment_id, marketing_brand_id, freeform_tags, defined_tags, if_match): + + if isinstance(fusion_environment_id, six.string_types) and len(fusion_environment_id.strip()) == 0: + raise click.UsageError('Parameter --fusion-environment-id cannot be whitespace or empty string') + + if isinstance(marketing_brand_id, six.string_types) and len(marketing_brand_id.strip()) == 0: + raise click.UsageError('Parameter --marketing-brand-id cannot be whitespace or empty string') + if not force: + if freeform_tags or defined_tags: + if not click.confirm("WARNING: Updates to freeform-tags and defined-tags will replace any existing values. Are you sure you want to continue?"): + ctx.abort() + + kwargs = {} + if if_match is not None: + kwargs['if_match'] = if_match + kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id']) + + _details = {} + + if freeform_tags is not None: + _details['freeformTags'] = cli_util.parse_json_parameter("freeform_tags", freeform_tags) + + if defined_tags is not None: + _details['definedTags'] = cli_util.parse_json_parameter("defined_tags", defined_tags) + + client = cli_util.build_client('fusion_apps', 'fusion_applications', ctx) + result = client.update_marketing_brand( + fusion_environment_id=fusion_environment_id, + marketing_brand_id=marketing_brand_id, + update_marketing_brand_details=_details, + **kwargs + ) + if wait_for_state: + + if hasattr(client, 'get_marketing_brand') and callable(getattr(client, 'get_marketing_brand')): + 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_marketing_brand(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) + + +@microsite_group.command(name=cli_util.override('fusion_apps.update_microsite.command_name', 'update'), help=u"""Updates an microsite \n[Command Reference](updateMicrosite)""") +@cli_util.option('--fusion-environment-id', required=True, help=u"""unique FusionEnvironment identifier""") +@cli_util.option('--marketing-brand-id', required=True, help=u"""unique brand identifier""") +@cli_util.option('--microsite-id', required=True, help=u"""unique microsite identifier""") +@cli_util.option('--freeform-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: `{\"bar-key\": \"value\"}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP) +@cli_util.option('--defined-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP) +@cli_util.option('--if-match', help=u"""For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.""") +@cli_util.option('--force', help="""Perform update without prompting for confirmation.""", is_flag=True) +@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACTIVE", "INACTIVE"]), multiple=True, help="""This operation creates, modifies or deletes a resource that has a defined lifecycle state. Specify this option to perform the action and then wait until the resource reaches a given lifecycle state. Multiple states can be specified, returning on the first state. For example, --wait-for-state ACTIVE --wait-for-state INACTIVE 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({'freeform-tags': {'module': 'fusion_apps', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'fusion_apps', '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={'freeform-tags': {'module': 'fusion_apps', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'fusion_apps', 'class': 'dict(str, dict(str, object))'}}, output_type={'module': 'fusion_apps', 'class': 'Microsite'}) +@cli_util.wrap_exceptions +def update_microsite(ctx, from_json, force, wait_for_state, max_wait_seconds, wait_interval_seconds, fusion_environment_id, marketing_brand_id, microsite_id, freeform_tags, defined_tags, if_match): + + if isinstance(fusion_environment_id, six.string_types) and len(fusion_environment_id.strip()) == 0: + raise click.UsageError('Parameter --fusion-environment-id cannot be whitespace or empty string') + + if isinstance(marketing_brand_id, six.string_types) and len(marketing_brand_id.strip()) == 0: + raise click.UsageError('Parameter --marketing-brand-id cannot be whitespace or empty string') + + if isinstance(microsite_id, six.string_types) and len(microsite_id.strip()) == 0: + raise click.UsageError('Parameter --microsite-id cannot be whitespace or empty string') + if not force: + if freeform_tags or defined_tags: + if not click.confirm("WARNING: Updates to freeform-tags and defined-tags will replace any existing values. Are you sure you want to continue?"): + ctx.abort() + + kwargs = {} + if if_match is not None: + kwargs['if_match'] = if_match + kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id']) + + _details = {} + + if freeform_tags is not None: + _details['freeformTags'] = cli_util.parse_json_parameter("freeform_tags", freeform_tags) + + if defined_tags is not None: + _details['definedTags'] = cli_util.parse_json_parameter("defined_tags", defined_tags) + + client = cli_util.build_client('fusion_apps', 'fusion_applications', ctx) + result = client.update_microsite( + fusion_environment_id=fusion_environment_id, + marketing_brand_id=marketing_brand_id, + microsite_id=microsite_id, + update_microsite_details=_details, + **kwargs + ) + if wait_for_state: + + if hasattr(client, 'get_microsite') and callable(getattr(client, 'get_microsite')): + 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_microsite(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) + + @update_refresh_activity_details_group.command(name=cli_util.override('fusion_apps.update_refresh_activity.command_name', 'update-refresh-activity'), help=u"""Updates a scheduled RefreshActivity. \n[Command Reference](updateRefreshActivity)""") @cli_util.option('--fusion-environment-id', required=True, help=u"""unique FusionEnvironment identifier""") @cli_util.option('--refresh-activity-id', required=True, help=u"""The unique identifier (OCID) of the Refresh activity.""") @@ -2244,6 +3347,248 @@ def update_refresh_activity(ctx, from_json, wait_for_state, max_wait_seconds, wa cli_util.render_response(result, ctx) +@email_subdomain_group.command(name=cli_util.override('fusion_apps.upload_email_subdomain_certificate.command_name', 'upload-email-subdomain-certificate'), help=u"""upload certificate for emailSubdomain \n[Command Reference](uploadEmailSubdomainCertificate)""") +@cli_util.option('--fusion-environment-id', required=True, help=u"""unique FusionEnvironment identifier""") +@cli_util.option('--marketing-brand-id', required=True, help=u"""unique brand identifier""") +@cli_util.option('--email-subdomain-id', required=True, help=u"""unique emailSubdomain identifier""") +@cli_util.option('--common-name', required=True, help=u"""fully qualified host name""") +@cli_util.option('--certificate-pem', required=True, help=u"""Certificate PEM""") +@cli_util.option('--certificate-chain-pem', help=u"""Certificate chain PEM, including intermediate and root""") +@cli_util.option('--if-match', help=u"""For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.""") +@json_skeleton_utils.get_cli_json_input_option({}) +@cli_util.help_option +@click.pass_context +@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}) +@cli_util.wrap_exceptions +def upload_email_subdomain_certificate(ctx, from_json, fusion_environment_id, marketing_brand_id, email_subdomain_id, common_name, certificate_pem, certificate_chain_pem, if_match): + + if isinstance(fusion_environment_id, six.string_types) and len(fusion_environment_id.strip()) == 0: + raise click.UsageError('Parameter --fusion-environment-id cannot be whitespace or empty string') + + if isinstance(marketing_brand_id, six.string_types) and len(marketing_brand_id.strip()) == 0: + raise click.UsageError('Parameter --marketing-brand-id cannot be whitespace or empty string') + + if isinstance(email_subdomain_id, six.string_types) and len(email_subdomain_id.strip()) == 0: + raise click.UsageError('Parameter --email-subdomain-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['commonName'] = common_name + _details['certificatePem'] = certificate_pem + + if certificate_chain_pem is not None: + _details['certificateChainPem'] = certificate_chain_pem + + client = cli_util.build_client('fusion_apps', 'fusion_applications', ctx) + result = client.upload_email_subdomain_certificate( + fusion_environment_id=fusion_environment_id, + marketing_brand_id=marketing_brand_id, + email_subdomain_id=email_subdomain_id, + upload_email_subdomain_certificate_details=_details, + **kwargs + ) + cli_util.render_response(result, ctx) + + +@email_subdomain_group.command(name=cli_util.override('fusion_apps.validate_and_configure_email_subdomain_certificate.command_name', 'validate-and-configure-email-subdomain-certificate'), help=u"""Validate and configure certificate for emailSubdomain \n[Command Reference](validateAndConfigureEmailSubdomainCertificate)""") +@cli_util.option('--fusion-environment-id', required=True, help=u"""unique FusionEnvironment identifier""") +@cli_util.option('--marketing-brand-id', required=True, help=u"""unique brand identifier""") +@cli_util.option('--email-subdomain-id', required=True, help=u"""unique emailSubdomain identifier""") +@cli_util.option('--if-match', help=u"""For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.""") +@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED"]), multiple=True, help="""This operation asynchronously creates, modifies or deletes a resource and uses a work request to track the progress of the operation. Specify this option to perform the action and then wait until the work request reaches a certain state. Multiple states can be specified, returning on the first state. For example, --wait-for-state ACCEPTED --wait-for-state CANCELED would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.""") +@cli_util.option('--max-wait-seconds', type=click.INT, help="""The maximum time to wait for the work request to reach the state defined by --wait-for-state. Defaults to 1200 seconds.""") +@cli_util.option('--wait-interval-seconds', type=click.INT, help="""Check every --wait-interval-seconds to see whether the work request has reached the state defined by --wait-for-state. Defaults to 30 seconds.""") +@json_skeleton_utils.get_cli_json_input_option({}) +@cli_util.help_option +@click.pass_context +@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}) +@cli_util.wrap_exceptions +def validate_and_configure_email_subdomain_certificate(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, fusion_environment_id, marketing_brand_id, email_subdomain_id, if_match): + + if isinstance(fusion_environment_id, six.string_types) and len(fusion_environment_id.strip()) == 0: + raise click.UsageError('Parameter --fusion-environment-id cannot be whitespace or empty string') + + if isinstance(marketing_brand_id, six.string_types) and len(marketing_brand_id.strip()) == 0: + raise click.UsageError('Parameter --marketing-brand-id cannot be whitespace or empty string') + + if isinstance(email_subdomain_id, six.string_types) and len(email_subdomain_id.strip()) == 0: + raise click.UsageError('Parameter --email-subdomain-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('fusion_apps', 'fusion_applications', ctx) + result = client.validate_and_configure_email_subdomain_certificate( + fusion_environment_id=fusion_environment_id, + marketing_brand_id=marketing_brand_id, + email_subdomain_id=email_subdomain_id, + **kwargs + ) + if wait_for_state: + + if hasattr(client, 'get_work_request') and callable(getattr(client, 'get_work_request')): + try: + wait_period_kwargs = {} + if max_wait_seconds is not None: + wait_period_kwargs['max_wait_seconds'] = max_wait_seconds + if wait_interval_seconds is not None: + wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds + if 'opc-work-request-id' not in result.headers: + click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state') + cli_util.render_response(result, ctx) + return + + click.echo('Action completed. Waiting until the work request has entered state: {}'.format(wait_for_state), file=sys.stderr) + result = oci.wait_until(client, client.get_work_request(result.headers['opc-work-request-id']), 'status', wait_for_state, **wait_period_kwargs) + except oci.exceptions.MaximumWaitTimeExceeded as e: + # If we fail, we should show an error, but we should still provide the information to the customer + click.echo('Failed to wait until the work request entered the specified state. Outputting last known resource state', file=sys.stderr) + cli_util.render_response(result, ctx) + sys.exit(2) + except Exception: + click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state', file=sys.stderr) + cli_util.render_response(result, ctx) + raise + else: + click.echo('Unable to wait for the work request to enter the specified state', file=sys.stderr) + cli_util.render_response(result, ctx) + + +@email_subdomain_group.command(name=cli_util.override('fusion_apps.validate_and_configure_email_subdomain_dns.command_name', 'validate-and-configure-email-subdomain-dns'), help=u"""Validate and configure DNS records for emailSubdomain \n[Command Reference](validateAndConfigureEmailSubdomainDns)""") +@cli_util.option('--fusion-environment-id', required=True, help=u"""unique FusionEnvironment identifier""") +@cli_util.option('--marketing-brand-id', required=True, help=u"""unique brand identifier""") +@cli_util.option('--email-subdomain-id', required=True, help=u"""unique emailSubdomain identifier""") +@cli_util.option('--if-match', help=u"""For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.""") +@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED"]), multiple=True, help="""This operation asynchronously creates, modifies or deletes a resource and uses a work request to track the progress of the operation. Specify this option to perform the action and then wait until the work request reaches a certain state. Multiple states can be specified, returning on the first state. For example, --wait-for-state ACCEPTED --wait-for-state CANCELED would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.""") +@cli_util.option('--max-wait-seconds', type=click.INT, help="""The maximum time to wait for the work request to reach the state defined by --wait-for-state. Defaults to 1200 seconds.""") +@cli_util.option('--wait-interval-seconds', type=click.INT, help="""Check every --wait-interval-seconds to see whether the work request has reached the state defined by --wait-for-state. Defaults to 30 seconds.""") +@json_skeleton_utils.get_cli_json_input_option({}) +@cli_util.help_option +@click.pass_context +@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}) +@cli_util.wrap_exceptions +def validate_and_configure_email_subdomain_dns(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, fusion_environment_id, marketing_brand_id, email_subdomain_id, if_match): + + if isinstance(fusion_environment_id, six.string_types) and len(fusion_environment_id.strip()) == 0: + raise click.UsageError('Parameter --fusion-environment-id cannot be whitespace or empty string') + + if isinstance(marketing_brand_id, six.string_types) and len(marketing_brand_id.strip()) == 0: + raise click.UsageError('Parameter --marketing-brand-id cannot be whitespace or empty string') + + if isinstance(email_subdomain_id, six.string_types) and len(email_subdomain_id.strip()) == 0: + raise click.UsageError('Parameter --email-subdomain-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('fusion_apps', 'fusion_applications', ctx) + result = client.validate_and_configure_email_subdomain_dns( + fusion_environment_id=fusion_environment_id, + marketing_brand_id=marketing_brand_id, + email_subdomain_id=email_subdomain_id, + **kwargs + ) + if wait_for_state: + + if hasattr(client, 'get_work_request') and callable(getattr(client, 'get_work_request')): + try: + wait_period_kwargs = {} + if max_wait_seconds is not None: + wait_period_kwargs['max_wait_seconds'] = max_wait_seconds + if wait_interval_seconds is not None: + wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds + if 'opc-work-request-id' not in result.headers: + click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state') + cli_util.render_response(result, ctx) + return + + click.echo('Action completed. Waiting until the work request has entered state: {}'.format(wait_for_state), file=sys.stderr) + result = oci.wait_until(client, client.get_work_request(result.headers['opc-work-request-id']), 'status', wait_for_state, **wait_period_kwargs) + except oci.exceptions.MaximumWaitTimeExceeded as e: + # If we fail, we should show an error, but we should still provide the information to the customer + click.echo('Failed to wait until the work request entered the specified state. Outputting last known resource state', file=sys.stderr) + cli_util.render_response(result, ctx) + sys.exit(2) + except Exception: + click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state', file=sys.stderr) + cli_util.render_response(result, ctx) + raise + else: + click.echo('Unable to wait for the work request to enter the specified state', file=sys.stderr) + cli_util.render_response(result, ctx) + + +@microsite_group.command(name=cli_util.override('fusion_apps.validate_and_configure_microsite_dns.command_name', 'validate-and-configure-microsite-dns'), help=u"""Validate and configure DNS records for microsite \n[Command Reference](validateAndConfigureMicrositeDns)""") +@cli_util.option('--fusion-environment-id', required=True, help=u"""unique FusionEnvironment identifier""") +@cli_util.option('--marketing-brand-id', required=True, help=u"""unique brand identifier""") +@cli_util.option('--microsite-id', required=True, help=u"""unique microsite identifier""") +@cli_util.option('--if-match', help=u"""For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.""") +@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED"]), multiple=True, help="""This operation asynchronously creates, modifies or deletes a resource and uses a work request to track the progress of the operation. Specify this option to perform the action and then wait until the work request reaches a certain state. Multiple states can be specified, returning on the first state. For example, --wait-for-state ACCEPTED --wait-for-state CANCELED would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.""") +@cli_util.option('--max-wait-seconds', type=click.INT, help="""The maximum time to wait for the work request to reach the state defined by --wait-for-state. Defaults to 1200 seconds.""") +@cli_util.option('--wait-interval-seconds', type=click.INT, help="""Check every --wait-interval-seconds to see whether the work request has reached the state defined by --wait-for-state. Defaults to 30 seconds.""") +@json_skeleton_utils.get_cli_json_input_option({}) +@cli_util.help_option +@click.pass_context +@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}) +@cli_util.wrap_exceptions +def validate_and_configure_microsite_dns(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, fusion_environment_id, marketing_brand_id, microsite_id, if_match): + + if isinstance(fusion_environment_id, six.string_types) and len(fusion_environment_id.strip()) == 0: + raise click.UsageError('Parameter --fusion-environment-id cannot be whitespace or empty string') + + if isinstance(marketing_brand_id, six.string_types) and len(marketing_brand_id.strip()) == 0: + raise click.UsageError('Parameter --marketing-brand-id cannot be whitespace or empty string') + + if isinstance(microsite_id, six.string_types) and len(microsite_id.strip()) == 0: + raise click.UsageError('Parameter --microsite-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('fusion_apps', 'fusion_applications', ctx) + result = client.validate_and_configure_microsite_dns( + fusion_environment_id=fusion_environment_id, + marketing_brand_id=marketing_brand_id, + microsite_id=microsite_id, + **kwargs + ) + if wait_for_state: + + if hasattr(client, 'get_work_request') and callable(getattr(client, 'get_work_request')): + try: + wait_period_kwargs = {} + if max_wait_seconds is not None: + wait_period_kwargs['max_wait_seconds'] = max_wait_seconds + if wait_interval_seconds is not None: + wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds + if 'opc-work-request-id' not in result.headers: + click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state') + cli_util.render_response(result, ctx) + return + + click.echo('Action completed. Waiting until the work request has entered state: {}'.format(wait_for_state), file=sys.stderr) + result = oci.wait_until(client, client.get_work_request(result.headers['opc-work-request-id']), 'status', wait_for_state, **wait_period_kwargs) + except oci.exceptions.MaximumWaitTimeExceeded as e: + # If we fail, we should show an error, but we should still provide the information to the customer + click.echo('Failed to wait until the work request entered the specified state. Outputting last known resource state', file=sys.stderr) + cli_util.render_response(result, ctx) + sys.exit(2) + except Exception: + click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state', file=sys.stderr) + cli_util.render_response(result, ctx) + raise + else: + click.echo('Unable to wait for the work request to enter the specified state', file=sys.stderr) + cli_util.render_response(result, ctx) + + @service_attachment_group.command(name=cli_util.override('fusion_apps.verify_service_attachment.command_name', 'verify'), help=u"""Verify whether a service instance can be attached to the fusion pod \n[Command Reference](verifyServiceAttachment)""") @cli_util.option('--service-instance-type', required=True, help=u"""Type of the ServiceInstance being attached.""") @cli_util.option('--service-instance-id', required=True, help=u"""The service instance OCID of the instance being attached""") diff --git a/services/fusion_apps/tests/util/generated/command_to_api.py b/services/fusion_apps/tests/util/generated/command_to_api.py index 75627bfb..fa1a2d20 100644 --- a/services/fusion_apps/tests/util/generated/command_to_api.py +++ b/services/fusion_apps/tests/util/generated/command_to_api.py @@ -5,23 +5,35 @@ "fusion_apps.change_fusion_environment_compartment": "oci.fusion_apps.FusionApplicationsClient.change_fusion_environment_compartment", "fusion_apps.change_fusion_environment_family_compartment": "oci.fusion_apps.FusionApplicationsClient.change_fusion_environment_family_compartment", "fusion_apps.create_data_masking_activity": "oci.fusion_apps.FusionApplicationsClient.create_data_masking_activity", + "fusion_apps.create_email_subdomain": "oci.fusion_apps.FusionApplicationsClient.create_email_subdomain", "fusion_apps.create_fusion_environment": "oci.fusion_apps.FusionApplicationsClient.create_fusion_environment", "fusion_apps.create_fusion_environment_admin_user": "oci.fusion_apps.FusionApplicationsClient.create_fusion_environment_admin_user", "fusion_apps.create_fusion_environment_family": "oci.fusion_apps.FusionApplicationsClient.create_fusion_environment_family", + "fusion_apps.create_marketing_brand": "oci.fusion_apps.FusionApplicationsClient.create_marketing_brand", + "fusion_apps.create_microsite": "oci.fusion_apps.FusionApplicationsClient.create_microsite", "fusion_apps.create_refresh_activity": "oci.fusion_apps.FusionApplicationsClient.create_refresh_activity", "fusion_apps.create_service_attachment": "oci.fusion_apps.FusionApplicationsClient.create_service_attachment", + "fusion_apps.delete_email_subdomain": "oci.fusion_apps.FusionApplicationsClient.delete_email_subdomain", "fusion_apps.delete_fusion_environment": "oci.fusion_apps.FusionApplicationsClient.delete_fusion_environment", "fusion_apps.delete_fusion_environment_admin_user": "oci.fusion_apps.FusionApplicationsClient.delete_fusion_environment_admin_user", "fusion_apps.delete_fusion_environment_family": "oci.fusion_apps.FusionApplicationsClient.delete_fusion_environment_family", + "fusion_apps.delete_marketing_brand": "oci.fusion_apps.FusionApplicationsClient.delete_marketing_brand", + "fusion_apps.delete_microsite": "oci.fusion_apps.FusionApplicationsClient.delete_microsite", "fusion_apps.delete_refresh_activity": "oci.fusion_apps.FusionApplicationsClient.delete_refresh_activity", "fusion_apps.delete_service_attachment": "oci.fusion_apps.FusionApplicationsClient.delete_service_attachment", "fusion_apps.generate_extract_details": "oci.fusion_apps.FusionApplicationsClient.generate_extract_details", "fusion_apps.get_data_masking_activity": "oci.fusion_apps.FusionApplicationsClient.get_data_masking_activity", + "fusion_apps.get_email_subdomain": "oci.fusion_apps.FusionApplicationsClient.get_email_subdomain", + "fusion_apps.get_email_subdomain_csr": "oci.fusion_apps.FusionApplicationsClient.get_email_subdomain_csr", + "fusion_apps.get_email_subdomain_dns_config": "oci.fusion_apps.FusionApplicationsClient.get_email_subdomain_dns_config", "fusion_apps.get_fusion_environment": "oci.fusion_apps.FusionApplicationsClient.get_fusion_environment", "fusion_apps.get_fusion_environment_family": "oci.fusion_apps.FusionApplicationsClient.get_fusion_environment_family", "fusion_apps.get_fusion_environment_family_limits_and_usage": "oci.fusion_apps.FusionApplicationsClient.get_fusion_environment_family_limits_and_usage", "fusion_apps.get_fusion_environment_family_subscription_detail": "oci.fusion_apps.FusionApplicationsClient.get_fusion_environment_family_subscription_detail", "fusion_apps.get_fusion_environment_status": "oci.fusion_apps.FusionApplicationsClient.get_fusion_environment_status", + "fusion_apps.get_marketing_brand": "oci.fusion_apps.FusionApplicationsClient.get_marketing_brand", + "fusion_apps.get_microsite": "oci.fusion_apps.FusionApplicationsClient.get_microsite", + "fusion_apps.get_microsite_dns_config": "oci.fusion_apps.FusionApplicationsClient.get_microsite_dns_config", "fusion_apps.get_refresh_activity": "oci.fusion_apps.FusionApplicationsClient.get_refresh_activity", "fusion_apps.get_scheduled_activity": "oci.fusion_apps.FusionApplicationsClient.get_scheduled_activity", "fusion_apps.get_service_attachment": "oci.fusion_apps.FusionApplicationsClient.get_service_attachment", @@ -29,8 +41,11 @@ "fusion_apps.initiate_extract": "oci.fusion_apps.FusionApplicationsClient.initiate_extract", "fusion_apps.list_admin_users": "oci.fusion_apps.FusionApplicationsClient.list_admin_users", "fusion_apps.list_data_masking_activities": "oci.fusion_apps.FusionApplicationsClient.list_data_masking_activities", + "fusion_apps.list_email_subdomains": "oci.fusion_apps.FusionApplicationsClient.list_email_subdomains", "fusion_apps.list_fusion_environment_families": "oci.fusion_apps.FusionApplicationsClient.list_fusion_environment_families", "fusion_apps.list_fusion_environments": "oci.fusion_apps.FusionApplicationsClient.list_fusion_environments", + "fusion_apps.list_marketing_brands": "oci.fusion_apps.FusionApplicationsClient.list_marketing_brands", + "fusion_apps.list_microsites": "oci.fusion_apps.FusionApplicationsClient.list_microsites", "fusion_apps.list_refresh_activities": "oci.fusion_apps.FusionApplicationsClient.list_refresh_activities", "fusion_apps.list_scheduled_activities": "oci.fusion_apps.FusionApplicationsClient.list_scheduled_activities", "fusion_apps.list_service_attachments": "oci.fusion_apps.FusionApplicationsClient.list_service_attachments", @@ -38,9 +53,17 @@ "fusion_apps.list_work_request_errors": "oci.fusion_apps.FusionApplicationsClient.list_work_request_errors", "fusion_apps.list_work_request_logs": "oci.fusion_apps.FusionApplicationsClient.list_work_request_logs", "fusion_apps.list_work_requests": "oci.fusion_apps.FusionApplicationsClient.list_work_requests", + "fusion_apps.request_email_subdomain_csr": "oci.fusion_apps.FusionApplicationsClient.request_email_subdomain_csr", "fusion_apps.reset_fusion_environment_password": "oci.fusion_apps.FusionApplicationsClient.reset_fusion_environment_password", + "fusion_apps.update_email_subdomain": "oci.fusion_apps.FusionApplicationsClient.update_email_subdomain", "fusion_apps.update_fusion_environment": "oci.fusion_apps.FusionApplicationsClient.update_fusion_environment", "fusion_apps.update_fusion_environment_family": "oci.fusion_apps.FusionApplicationsClient.update_fusion_environment_family", + "fusion_apps.update_marketing_brand": "oci.fusion_apps.FusionApplicationsClient.update_marketing_brand", + "fusion_apps.update_microsite": "oci.fusion_apps.FusionApplicationsClient.update_microsite", "fusion_apps.update_refresh_activity": "oci.fusion_apps.FusionApplicationsClient.update_refresh_activity", + "fusion_apps.upload_email_subdomain_certificate": "oci.fusion_apps.FusionApplicationsClient.upload_email_subdomain_certificate", + "fusion_apps.validate_and_configure_email_subdomain_certificate": "oci.fusion_apps.FusionApplicationsClient.validate_and_configure_email_subdomain_certificate", + "fusion_apps.validate_and_configure_email_subdomain_dns": "oci.fusion_apps.FusionApplicationsClient.validate_and_configure_email_subdomain_dns", + "fusion_apps.validate_and_configure_microsite_dns": "oci.fusion_apps.FusionApplicationsClient.validate_and_configure_microsite_dns", "fusion_apps.verify_service_attachment": "oci.fusion_apps.FusionApplicationsClient.verify_service_attachment", } diff --git a/services/golden_gate/src/oci_cli_golden_gate/generated/goldengate_cli.py b/services/golden_gate/src/oci_cli_golden_gate/generated/goldengate_cli.py index 249d0b0c..b8626dbe 100644 --- a/services/golden_gate/src/oci_cli_golden_gate/generated/goldengate_cli.py +++ b/services/golden_gate/src/oci_cli_golden_gate/generated/goldengate_cli.py @@ -237,7 +237,7 @@ def add_connection_lock(ctx, from_json, wait_for_state, max_wait_seconds, wait_i @cli_util.option('--type', required=True, type=custom_types.CliCaseInsensitiveChoice(["FULL", "DELETE"]), help=u"""Type of the lock.""") @cli_util.option('--message', help=u"""A message added by the creator of the lock. This is typically used to give an indication of why the resource is locked.""") @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(["CREATING", "UPDATING", "ACTIVE", "INACTIVE", "DELETING", "DELETED", "FAILED", "NEEDS_ATTENTION", "IN_PROGRESS", "CANCELING", "CANCELED", "SUCCEEDED", "WAITING"]), 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 WAITING would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.""") +@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["CREATING", "ACTIVE", "DELETING", "DELETED", "FAILED", "CANCELING", "CANCELED"]), 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 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 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({}) @@ -365,7 +365,7 @@ def add_deployment_local_peer(ctx, from_json, wait_for_state, max_wait_seconds, @cli_util.option('--type', required=True, type=custom_types.CliCaseInsensitiveChoice(["FULL", "DELETE"]), help=u"""Type of the lock.""") @cli_util.option('--message', help=u"""A message added by the creator of the lock. This is typically used to give an indication of why the resource is locked.""") @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(["CREATING", "UPDATING", "ACTIVE", "INACTIVE", "DELETING", "DELETED", "FAILED", "NEEDS_ATTENTION", "IN_PROGRESS", "CANCELING", "CANCELED", "SUCCEEDED", "WAITING"]), 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 WAITING would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.""") +@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["CREATING", "UPDATING", "ACTIVE", "INACTIVE", "DELETING", "DELETED", "FAILED", "NEEDS_ATTENTION"]), 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 NEEDS_ATTENTION 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({}) @@ -553,7 +553,7 @@ def cancel_deployment_backup_default_cancel_deployment_backup_details(ctx, from_ @cli_util.option('--deployment-upgrade-id', required=True, help=u"""A unique Deployment Upgrade identifier.""") @cli_util.option('--type', required=True, type=custom_types.CliCaseInsensitiveChoice(["DEFAULT"]), help=u"""The type of a deploymentUpgrade cancel.""") @cli_util.option('--if-match', help=u"""For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource is updated or deleted only if the etag you provide matches the resource's current etag value.""") -@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["CREATING", "UPDATING", "ACTIVE", "INACTIVE", "DELETING", "DELETED", "FAILED", "NEEDS_ATTENTION", "IN_PROGRESS", "CANCELING", "CANCELED", "SUCCEEDED", "WAITING"]), 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 WAITING would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.""") +@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["WAITING", "IN_PROGRESS", "FAILED", "SUCCEEDED", "CANCELED"]), 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 WAITING --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 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({}) @@ -609,7 +609,7 @@ def cancel_deployment_upgrade(ctx, from_json, wait_for_state, max_wait_seconds, @deployment_upgrade_group.command(name=cli_util.override('goldengate.cancel_deployment_upgrade_default_cancel_deployment_upgrade_details.command_name', 'cancel-deployment-upgrade-default-cancel-deployment-upgrade-details'), help=u"""Cancels a DeploymentUpgrade, applicable only for DeploymentUpgrade in Waiting state. When provided, If-Match is checked against ETag values of the resource. \n[Command Reference](cancelDeploymentUpgrade)""") @cli_util.option('--deployment-upgrade-id', required=True, help=u"""A unique Deployment Upgrade identifier.""") @cli_util.option('--if-match', help=u"""For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource is 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(["CREATING", "UPDATING", "ACTIVE", "INACTIVE", "DELETING", "DELETED", "FAILED", "NEEDS_ATTENTION", "IN_PROGRESS", "CANCELING", "CANCELED", "SUCCEEDED", "WAITING"]), 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 WAITING would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.""") +@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["WAITING", "IN_PROGRESS", "FAILED", "SUCCEEDED", "CANCELED"]), 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 WAITING --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 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({}) @@ -1582,9 +1582,6 @@ def create_connection(ctx, from_json, wait_for_state, max_wait_seconds, wait_int @cli_util.option('--ssl-cert', help=u"""The base64 encoded certificate of the PostgreSQL server. The supported file formats are .pem and .crt. It is not included in GET responses if the `view=COMPACT` query parameter is specified.""") @cli_util.option('--ssl-key', help=u"""The base64 encoded private key of the PostgreSQL server. The supported file formats are .pem and .crt. Deprecated: This field is deprecated and replaced by \"sslKeySecretId\". This field will be removed after February 15 2026.""") @cli_util.option('--ssl-key-secret-id', help=u"""The [OCID] of the Secret that stores the private key of the PostgreSQL server. The supported file formats are .pem and .crt. Note: When provided, 'sslKey' field must not be provided.""") -@cli_util.option('--private-ip', help=u"""Deprecated: this field will be removed in future versions. Either specify the private IP in the connectionString or host field, or make sure the host name is resolvable in the target VCN. - -The private IP address of the connection's endpoint in the customer's VCN, typically a database endpoint or a big data endpoint (e.g. Kafka bootstrap server). In case the privateIp is provided, the subnetId must also be provided. In case the privateIp (and the subnetId) is not provided it is assumed the datasource is publicly accessible. In case the connection is accessible only privately, the lack of privateIp will result in not being able to access the connection.""") @cli_util.option('--db-system-id', help=u"""The [OCID] of the database system being referenced.""") @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "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.""") @@ -1594,7 +1591,7 @@ def create_connection(ctx, from_json, wait_for_state, max_wait_seconds, wait_int @click.pass_context @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'freeform-tags': {'module': 'golden_gate', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'golden_gate', 'class': 'dict(str, dict(str, object))'}, 'locks': {'module': 'golden_gate', 'class': 'list[AddResourceLockDetails]'}, 'nsg-ids': {'module': 'golden_gate', 'class': 'list[string]'}, 'security-attributes': {'module': 'golden_gate', 'class': 'dict(str, dict(str, object))'}, 'additional-attributes': {'module': 'golden_gate', 'class': 'list[NameValuePair]'}}, output_type={'module': 'golden_gate', 'class': 'Connection'}) @cli_util.wrap_exceptions -def create_connection_create_postgresql_connection_details(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, display_name, compartment_id, technology_type, database_name, username, security_protocol, description, freeform_tags, defined_tags, locks, vault_id, key_id, nsg_ids, subnet_id, routing_method, does_use_secret_ids, subscription_id, cluster_placement_group_id, security_attributes, host, port, password, password_secret_id, additional_attributes, ssl_mode, ssl_ca, ssl_crl, ssl_cert, ssl_key, ssl_key_secret_id, private_ip, db_system_id): +def create_connection_create_postgresql_connection_details(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, display_name, compartment_id, technology_type, database_name, username, security_protocol, description, freeform_tags, defined_tags, locks, vault_id, key_id, nsg_ids, subnet_id, routing_method, does_use_secret_ids, subscription_id, cluster_placement_group_id, security_attributes, host, port, password, password_secret_id, additional_attributes, ssl_mode, ssl_ca, ssl_crl, ssl_cert, ssl_key, ssl_key_secret_id, db_system_id): kwargs = {} kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id']) @@ -1679,9 +1676,6 @@ def create_connection_create_postgresql_connection_details(ctx, from_json, wait_ if ssl_key_secret_id is not None: _details['sslKeySecretId'] = ssl_key_secret_id - if private_ip is not None: - _details['privateIp'] = private_ip - if db_system_id is not None: _details['dbSystemId'] = db_system_id @@ -1762,9 +1756,6 @@ def create_connection_create_postgresql_connection_details(ctx, from_json, wait_ @cli_util.option('--key-store-password-secret-id', help=u"""The [OCID] of the Secret where the kafka Ssl KeyStore password is stored. Note: When provided, 'keyStorePassword' field must not be provided.""") @cli_util.option('--ssl-key-password', help=u"""The password for the cert inside the KeyStore. In case it differs from the KeyStore password, it should be provided. Deprecated: This field is deprecated and replaced by \"sslKeyPasswordSecretId\". This field will be removed after February 15 2026.""") @cli_util.option('--ssl-key-password-secret-id', help=u"""The [OCID] of the Secret that stores the password for the cert inside the KeyStore. In case it differs from the KeyStore password, it should be provided. Note: When provided, 'sslKeyPassword' field must not be provided.""") -@cli_util.option('--private-ip', help=u"""Deprecated: this field will be removed in future versions. Either specify the private IP in the connectionString or host field, or make sure the host name is resolvable in the target VCN. - -The private IP address of the connection's endpoint in the customer's VCN, typically a database endpoint or a big data endpoint (e.g. Kafka bootstrap server). In case the privateIp is provided, the subnetId must also be provided. In case the privateIp (and the subnetId) is not provided it is assumed the datasource is publicly accessible. In case the connection is accessible only privately, the lack of privateIp will result in not being able to access the connection.""") @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "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.""") @@ -1773,7 +1764,7 @@ def create_connection_create_postgresql_connection_details(ctx, from_json, wait_ @click.pass_context @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'freeform-tags': {'module': 'golden_gate', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'golden_gate', 'class': 'dict(str, dict(str, object))'}, 'locks': {'module': 'golden_gate', 'class': 'list[AddResourceLockDetails]'}, 'nsg-ids': {'module': 'golden_gate', 'class': 'list[string]'}, 'security-attributes': {'module': 'golden_gate', 'class': 'dict(str, dict(str, object))'}}, output_type={'module': 'golden_gate', 'class': 'Connection'}) @cli_util.wrap_exceptions -def create_connection_create_kafka_schema_registry_connection_details(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, display_name, compartment_id, technology_type, url, authentication_type, description, freeform_tags, defined_tags, locks, vault_id, key_id, nsg_ids, subnet_id, routing_method, does_use_secret_ids, subscription_id, cluster_placement_group_id, security_attributes, username, password, password_secret_id, trust_store, trust_store_secret_id, trust_store_password, trust_store_password_secret_id, key_store, key_store_secret_id, key_store_password, key_store_password_secret_id, ssl_key_password, ssl_key_password_secret_id, private_ip): +def create_connection_create_kafka_schema_registry_connection_details(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, display_name, compartment_id, technology_type, url, authentication_type, description, freeform_tags, defined_tags, locks, vault_id, key_id, nsg_ids, subnet_id, routing_method, does_use_secret_ids, subscription_id, cluster_placement_group_id, security_attributes, username, password, password_secret_id, trust_store, trust_store_secret_id, trust_store_password, trust_store_password_secret_id, key_store, key_store_secret_id, key_store_password, key_store_password_secret_id, ssl_key_password, ssl_key_password_secret_id): kwargs = {} kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id']) @@ -1863,9 +1854,6 @@ def create_connection_create_kafka_schema_registry_connection_details(ctx, from_ if ssl_key_password_secret_id is not None: _details['sslKeyPasswordSecretId'] = ssl_key_password_secret_id - if private_ip is not None: - _details['privateIp'] = private_ip - _details['connectionType'] = 'KAFKA_SCHEMA_REGISTRY' client = cli_util.build_client('golden_gate', 'golden_gate', ctx) @@ -1940,9 +1928,6 @@ def create_connection_create_kafka_schema_registry_connection_details(ctx, from_ This option is a JSON list with items of type NameValuePair. For documentation on NameValuePair please see our API reference: https://docs.oracle.com/en-us/iaas/api/#/en/goldengate/20200407/datatypes/NameValuePair.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP) @cli_util.option('--ssl-ca', help=u"""Database Certificate - The base64 encoded content of a .pem or .crt file containing the server public key (for 1-way SSL).""") @cli_util.option('--should-validate-server-certificate', type=click.BOOL, help=u"""If set to true, the driver validates the certificate that is sent by the database server.""") -@cli_util.option('--private-ip', help=u"""Deprecated: this field will be removed in future versions. Either specify the private IP in the connectionString or host field, or make sure the host name is resolvable in the target VCN. - -The private IP address of the connection's endpoint in the customer's VCN, typically a database endpoint or a big data endpoint (e.g. Kafka bootstrap server). In case the privateIp is provided, the subnetId must also be provided. In case the privateIp (and the subnetId) is not provided it is assumed the datasource is publicly accessible. In case the connection is accessible only privately, the lack of privateIp will result in not being able to access the connection.""") @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "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.""") @@ -1951,7 +1936,7 @@ def create_connection_create_kafka_schema_registry_connection_details(ctx, from_ @click.pass_context @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'freeform-tags': {'module': 'golden_gate', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'golden_gate', 'class': 'dict(str, dict(str, object))'}, 'locks': {'module': 'golden_gate', 'class': 'list[AddResourceLockDetails]'}, 'nsg-ids': {'module': 'golden_gate', 'class': 'list[string]'}, 'security-attributes': {'module': 'golden_gate', 'class': 'dict(str, dict(str, object))'}, 'additional-attributes': {'module': 'golden_gate', 'class': 'list[NameValuePair]'}}, output_type={'module': 'golden_gate', 'class': 'Connection'}) @cli_util.wrap_exceptions -def create_connection_create_microsoft_sqlserver_connection_details(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, display_name, compartment_id, technology_type, database_name, host, port, username, security_protocol, description, freeform_tags, defined_tags, locks, vault_id, key_id, nsg_ids, subnet_id, routing_method, does_use_secret_ids, subscription_id, cluster_placement_group_id, security_attributes, password, password_secret_id, additional_attributes, ssl_ca, should_validate_server_certificate, private_ip): +def create_connection_create_microsoft_sqlserver_connection_details(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, display_name, compartment_id, technology_type, database_name, host, port, username, security_protocol, description, freeform_tags, defined_tags, locks, vault_id, key_id, nsg_ids, subnet_id, routing_method, does_use_secret_ids, subscription_id, cluster_placement_group_id, security_attributes, password, password_secret_id, additional_attributes, ssl_ca, should_validate_server_certificate): kwargs = {} kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id']) @@ -2020,9 +2005,6 @@ def create_connection_create_microsoft_sqlserver_connection_details(ctx, from_js if should_validate_server_certificate is not None: _details['shouldValidateServerCertificate'] = should_validate_server_certificate - if private_ip is not None: - _details['privateIp'] = private_ip - _details['connectionType'] = 'MICROSOFT_SQLSERVER' client = cli_util.build_client('golden_gate', 'golden_gate', ctx) @@ -3098,6 +3080,7 @@ def create_connection_create_microsoft_fabric_connection_details(ctx, from_json, @cli_util.option('--security-attributes', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Security attributes for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags]. Example: `{\"Oracle-ZPR\": {\"MaxEgressCount\": {\"value\": \"42\", \"mode\": \"enforce\"}}}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP) +@cli_util.option('--endpoint-parameterconflict', help=u"""A legal URL to connect to Google Cloud Storage including scheme, server name and port (if not the default port). Default: https://storage.googleapis.com""") @cli_util.option('--service-account-key-file', help=u"""The base64 encoded content of the service account key file containing the credentials required to use Google Cloud Storage. Deprecated: This field is deprecated and replaced by \"serviceAccountKeyFileSecretId\". This field will be removed after February 15 2026.""") @cli_util.option('--service-account-key-file-secret-id', help=u"""The [OCID] of the Secret where the content of the service account key file is stored, which contains the credentials required to use Google Cloud Storage. Note: When provided, 'serviceAccountKeyFile' field must not be provided.""") @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "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.""") @@ -3108,7 +3091,7 @@ def create_connection_create_microsoft_fabric_connection_details(ctx, from_json, @click.pass_context @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'freeform-tags': {'module': 'golden_gate', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'golden_gate', 'class': 'dict(str, dict(str, object))'}, 'locks': {'module': 'golden_gate', 'class': 'list[AddResourceLockDetails]'}, 'nsg-ids': {'module': 'golden_gate', 'class': 'list[string]'}, 'security-attributes': {'module': 'golden_gate', 'class': 'dict(str, dict(str, object))'}}, output_type={'module': 'golden_gate', 'class': 'Connection'}) @cli_util.wrap_exceptions -def create_connection_create_google_cloud_storage_connection_details(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, display_name, compartment_id, technology_type, description, freeform_tags, defined_tags, locks, vault_id, key_id, nsg_ids, subnet_id, routing_method, does_use_secret_ids, subscription_id, cluster_placement_group_id, security_attributes, service_account_key_file, service_account_key_file_secret_id): +def create_connection_create_google_cloud_storage_connection_details(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, display_name, compartment_id, technology_type, description, freeform_tags, defined_tags, locks, vault_id, key_id, nsg_ids, subnet_id, routing_method, does_use_secret_ids, subscription_id, cluster_placement_group_id, security_attributes, endpoint_parameterconflict, service_account_key_file, service_account_key_file_secret_id): kwargs = {} kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id']) @@ -3157,6 +3140,9 @@ def create_connection_create_google_cloud_storage_connection_details(ctx, from_j if security_attributes is not None: _details['securityAttributes'] = cli_util.parse_json_parameter("security_attributes", security_attributes) + if endpoint_parameterconflict is not None: + _details['endpoint'] = endpoint_parameterconflict + if service_account_key_file is not None: _details['serviceAccountKeyFile'] = service_account_key_file @@ -3229,7 +3215,7 @@ def create_connection_create_google_cloud_storage_connection_details(ctx, from_j @cli_util.option('--cluster-id', help=u"""The [OCID] of the Kafka cluster being referenced from OCI Streaming with Apache Kafka.""") @cli_util.option('--bootstrap-servers', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Kafka bootstrap. Equivalent of bootstrap.servers configuration property in Kafka: list of KafkaBootstrapServer objects specified by host/port. Used for establishing the initial connection to the Kafka cluster. Example: `\"server1.example.com:9092,server2.example.com:9092\"` -This option is a JSON list with items of type KafkaBootstrapServer. For documentation on KafkaBootstrapServer please see our API reference: https://docs.oracle.com/en-us/iaas/api/#/en/goldengate/20200407/datatypes/KafkaBootstrapServer.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP) +This option is a JSON list with items of type CreateKafkaBootstrapServer. For documentation on CreateKafkaBootstrapServer please see our API reference: https://docs.oracle.com/en-us/iaas/api/#/en/goldengate/20200407/datatypes/CreateKafkaBootstrapServer.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP) @cli_util.option('--security-protocol', help=u"""Security Type for Kafka.""") @cli_util.option('--username', help=u"""The username Oracle GoldenGate uses to connect the associated system of the given technology. This username must already exist and be available by the system/application to be connected to and must conform to the case sensitivty requirments defined in it.""") @cli_util.option('--password', help=u"""The password Oracle GoldenGate uses to connect the associated system of the given technology. It must conform to the specific security requirements including length, case sensitivity, and so on. Deprecated: This field is deprecated and replaced by \"passwordSecretId\". This field will be removed after February 15 2026.""") @@ -3250,10 +3236,10 @@ def create_connection_create_google_cloud_storage_connection_details(ctx, from_j @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "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({'freeform-tags': {'module': 'golden_gate', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'golden_gate', 'class': 'dict(str, dict(str, object))'}, 'locks': {'module': 'golden_gate', 'class': 'list[AddResourceLockDetails]'}, 'nsg-ids': {'module': 'golden_gate', 'class': 'list[string]'}, 'security-attributes': {'module': 'golden_gate', 'class': 'dict(str, dict(str, object))'}, 'bootstrap-servers': {'module': 'golden_gate', 'class': 'list[KafkaBootstrapServer]'}}) +@json_skeleton_utils.get_cli_json_input_option({'freeform-tags': {'module': 'golden_gate', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'golden_gate', 'class': 'dict(str, dict(str, object))'}, 'locks': {'module': 'golden_gate', 'class': 'list[AddResourceLockDetails]'}, 'nsg-ids': {'module': 'golden_gate', 'class': 'list[string]'}, 'security-attributes': {'module': 'golden_gate', 'class': 'dict(str, dict(str, object))'}, 'bootstrap-servers': {'module': 'golden_gate', 'class': 'list[CreateKafkaBootstrapServer]'}}) @cli_util.help_option @click.pass_context -@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'freeform-tags': {'module': 'golden_gate', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'golden_gate', 'class': 'dict(str, dict(str, object))'}, 'locks': {'module': 'golden_gate', 'class': 'list[AddResourceLockDetails]'}, 'nsg-ids': {'module': 'golden_gate', 'class': 'list[string]'}, 'security-attributes': {'module': 'golden_gate', 'class': 'dict(str, dict(str, object))'}, 'bootstrap-servers': {'module': 'golden_gate', 'class': 'list[KafkaBootstrapServer]'}}, output_type={'module': 'golden_gate', 'class': 'Connection'}) +@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'freeform-tags': {'module': 'golden_gate', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'golden_gate', 'class': 'dict(str, dict(str, object))'}, 'locks': {'module': 'golden_gate', 'class': 'list[AddResourceLockDetails]'}, 'nsg-ids': {'module': 'golden_gate', 'class': 'list[string]'}, 'security-attributes': {'module': 'golden_gate', 'class': 'dict(str, dict(str, object))'}, 'bootstrap-servers': {'module': 'golden_gate', 'class': 'list[CreateKafkaBootstrapServer]'}}, output_type={'module': 'golden_gate', 'class': 'Connection'}) @cli_util.wrap_exceptions def create_connection_create_kafka_connection_details(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, display_name, compartment_id, technology_type, description, freeform_tags, defined_tags, locks, vault_id, key_id, nsg_ids, subnet_id, routing_method, does_use_secret_ids, subscription_id, cluster_placement_group_id, security_attributes, stream_pool_id, cluster_id, bootstrap_servers, security_protocol, username, password, password_secret_id, trust_store, trust_store_secret_id, trust_store_password, trust_store_password_secret_id, key_store, key_store_secret_id, key_store_password, key_store_password_secret_id, ssl_key_password, ssl_key_password_secret_id, consumer_properties, producer_properties, should_use_resource_principal): @@ -3605,9 +3591,6 @@ def create_connection_create_oracle_nosql_connection_details(ctx, from_json, wai @cli_util.option('--key-store-password-secret-id', help=u"""The [OCID] of the Secret where the KeyStore password is stored. Note: When provided, 'keyStorePassword' field must not be provided.""") @cli_util.option('--ssl-key-password', help=u"""The password for the cert inside of the KeyStore. In case it differs from the KeyStore password, it should be provided. Deprecated: This field is deprecated and replaced by \"sslKeyPasswordSecretId\". This field will be removed after February 15 2026.""") @cli_util.option('--ssl-key-password-secret-id', help=u"""The [OCID] of the Secret where the password is stored for the cert inside of the Keystore. In case it differs from the KeyStore password, it should be provided. Note: When provided, 'sslKeyPassword' field must not be provided.""") -@cli_util.option('--private-ip', help=u"""Deprecated: this field will be removed in future versions. Either specify the private IP in the connectionString or host field, or make sure the host name is resolvable in the target VCN. - -The private IP address of the connection's endpoint in the customer's VCN, typically a database endpoint or a big data endpoint (e.g. Kafka bootstrap server). In case the privateIp is provided, the subnetId must also be provided. In case the privateIp (and the subnetId) is not provided it is assumed the datasource is publicly accessible. In case the connection is accessible only privately, the lack of privateIp will result in not being able to access the connection.""") @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "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.""") @@ -3616,7 +3599,7 @@ def create_connection_create_oracle_nosql_connection_details(ctx, from_json, wai @click.pass_context @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'freeform-tags': {'module': 'golden_gate', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'golden_gate', 'class': 'dict(str, dict(str, object))'}, 'locks': {'module': 'golden_gate', 'class': 'list[AddResourceLockDetails]'}, 'nsg-ids': {'module': 'golden_gate', 'class': 'list[string]'}, 'security-attributes': {'module': 'golden_gate', 'class': 'dict(str, dict(str, object))'}}, output_type={'module': 'golden_gate', 'class': 'Connection'}) @cli_util.wrap_exceptions -def create_connection_create_java_message_service_connection_details(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, display_name, compartment_id, technology_type, should_use_jndi, description, freeform_tags, defined_tags, locks, vault_id, key_id, nsg_ids, subnet_id, routing_method, does_use_secret_ids, subscription_id, cluster_placement_group_id, security_attributes, jndi_connection_factory, jndi_provider_url, jndi_initial_context_factory, jndi_security_principal, jndi_security_credentials, jndi_security_credentials_secret_id, connection_url, connection_factory, username, password, password_secret_id, security_protocol, authentication_type, trust_store, trust_store_secret_id, trust_store_password, trust_store_password_secret_id, key_store, key_store_secret_id, key_store_password, key_store_password_secret_id, ssl_key_password, ssl_key_password_secret_id, private_ip): +def create_connection_create_java_message_service_connection_details(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, display_name, compartment_id, technology_type, should_use_jndi, description, freeform_tags, defined_tags, locks, vault_id, key_id, nsg_ids, subnet_id, routing_method, does_use_secret_ids, subscription_id, cluster_placement_group_id, security_attributes, jndi_connection_factory, jndi_provider_url, jndi_initial_context_factory, jndi_security_principal, jndi_security_credentials, jndi_security_credentials_secret_id, connection_url, connection_factory, username, password, password_secret_id, security_protocol, authentication_type, trust_store, trust_store_secret_id, trust_store_password, trust_store_password_secret_id, key_store, key_store_secret_id, key_store_password, key_store_password_secret_id, ssl_key_password, ssl_key_password_secret_id): kwargs = {} kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id']) @@ -3735,9 +3718,6 @@ def create_connection_create_java_message_service_connection_details(ctx, from_j if ssl_key_password_secret_id is not None: _details['sslKeyPasswordSecretId'] = ssl_key_password_secret_id - if private_ip is not None: - _details['privateIp'] = private_ip - _details['connectionType'] = 'JAVA_MESSAGE_SERVICE' client = cli_util.build_client('golden_gate', 'golden_gate', ctx) @@ -3800,6 +3780,7 @@ def create_connection_create_java_message_service_connection_details(ctx, from_j @cli_util.option('--security-attributes', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Security attributes for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags]. Example: `{\"Oracle-ZPR\": {\"MaxEgressCount\": {\"value\": \"42\", \"mode\": \"enforce\"}}}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP) +@cli_util.option('--endpoint-parameterconflict', help=u"""A legal URL to connect to BigQuery including scheme, server name and port (if not the default port). Default: https://bigquery.googleapis.com""") @cli_util.option('--service-account-key-file', help=u"""The base64 encoded content of the service account key file containing the credentials required to use Google BigQuery. Deprecated: This field is deprecated and replaced by \"serviceAccountKeyFileSecretId\". This field will be removed after February 15 2026.""") @cli_util.option('--service-account-key-file-secret-id', help=u"""The [OCID] of the Secret where the content of the service account key file is stored, which contains the credentials required to use Google BigQuery. Note: When provided, 'serviceAccountKeyFile' field must not be provided.""") @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "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.""") @@ -3810,7 +3791,7 @@ def create_connection_create_java_message_service_connection_details(ctx, from_j @click.pass_context @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'freeform-tags': {'module': 'golden_gate', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'golden_gate', 'class': 'dict(str, dict(str, object))'}, 'locks': {'module': 'golden_gate', 'class': 'list[AddResourceLockDetails]'}, 'nsg-ids': {'module': 'golden_gate', 'class': 'list[string]'}, 'security-attributes': {'module': 'golden_gate', 'class': 'dict(str, dict(str, object))'}}, output_type={'module': 'golden_gate', 'class': 'Connection'}) @cli_util.wrap_exceptions -def create_connection_create_google_big_query_connection_details(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, display_name, compartment_id, technology_type, description, freeform_tags, defined_tags, locks, vault_id, key_id, nsg_ids, subnet_id, routing_method, does_use_secret_ids, subscription_id, cluster_placement_group_id, security_attributes, service_account_key_file, service_account_key_file_secret_id): +def create_connection_create_google_big_query_connection_details(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, display_name, compartment_id, technology_type, description, freeform_tags, defined_tags, locks, vault_id, key_id, nsg_ids, subnet_id, routing_method, does_use_secret_ids, subscription_id, cluster_placement_group_id, security_attributes, endpoint_parameterconflict, service_account_key_file, service_account_key_file_secret_id): kwargs = {} kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id']) @@ -3859,6 +3840,9 @@ def create_connection_create_google_big_query_connection_details(ctx, from_json, if security_attributes is not None: _details['securityAttributes'] = cli_util.parse_json_parameter("security_attributes", security_attributes) + if endpoint_parameterconflict is not None: + _details['endpoint'] = endpoint_parameterconflict + if service_account_key_file is not None: _details['serviceAccountKeyFile'] = service_account_key_file @@ -4245,6 +4229,8 @@ def create_connection_create_mongo_db_connection_details(ctx, from_json, wait_fo @cli_util.option('--user-id', help=u"""The [OCID] of the OCI user who will access the Object Storage. The user must have write access to the bucket they want to connect to. If the user is not provided, backend will default to the user who is calling the API endpoint.""") @cli_util.option('--private-key-file-secret-id', help=u"""The [OCID] of the Secret that stores the content of the private key file (PEM file) corresponding to the API key of the fingerprint. See documentation: https://docs.oracle.com/en-us/iaas/Content/Identity/Tasks/managingcredentials.htm Note: When provided, 'privateKeyFile' field must not be provided.""") @cli_util.option('--private-key-passphrase-secret-id', help=u"""The [OCID] of the Secret that stores the passphrase of the private key. Note: When provided, 'privateKeyPassphrase' field must not be provided.""") +@cli_util.option('--private-key-file', help=u"""The base64 encoded content of the private key file (PEM file) corresponding to the API key of the fingerprint. See documentation: https://docs.oracle.com/en-us/iaas/Content/Identity/Tasks/managingcredentials.htm Deprecated: This field is deprecated and replaced by \"privateKeyFileSecretId\". This field will be removed after February 15 2026.""") +@cli_util.option('--private-key-passphrase', help=u"""The passphrase of the private key. Deprecated: This field is deprecated and replaced by \"privateKeyPassphraseSecretId\". This field will be removed after February 15 2026.""") @cli_util.option('--public-key-fingerprint', help=u"""The fingerprint of the API Key of the user specified by the userId. See documentation: https://docs.oracle.com/en-us/iaas/Content/Identity/Tasks/managingcredentials.htm""") @cli_util.option('--should-use-resource-principal', type=click.BOOL, help=u"""Specifies that the user intends to authenticate to the instance using a resource principal. Default: false""") @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "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.""") @@ -4255,7 +4241,7 @@ def create_connection_create_mongo_db_connection_details(ctx, from_json, wait_fo @click.pass_context @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'freeform-tags': {'module': 'golden_gate', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'golden_gate', 'class': 'dict(str, dict(str, object))'}, 'locks': {'module': 'golden_gate', 'class': 'list[AddResourceLockDetails]'}, 'nsg-ids': {'module': 'golden_gate', 'class': 'list[string]'}, 'security-attributes': {'module': 'golden_gate', 'class': 'dict(str, dict(str, object))'}}, output_type={'module': 'golden_gate', 'class': 'Connection'}) @cli_util.wrap_exceptions -def create_connection_create_oracle_ai_data_platform_connection_details(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, display_name, compartment_id, technology_type, connection_url, description, freeform_tags, defined_tags, locks, vault_id, key_id, nsg_ids, subnet_id, routing_method, does_use_secret_ids, subscription_id, cluster_placement_group_id, security_attributes, tenancy_id, region_parameterconflict, user_id, private_key_file_secret_id, private_key_passphrase_secret_id, public_key_fingerprint, should_use_resource_principal): +def create_connection_create_oracle_ai_data_platform_connection_details(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, display_name, compartment_id, technology_type, connection_url, description, freeform_tags, defined_tags, locks, vault_id, key_id, nsg_ids, subnet_id, routing_method, does_use_secret_ids, subscription_id, cluster_placement_group_id, security_attributes, tenancy_id, region_parameterconflict, user_id, private_key_file_secret_id, private_key_passphrase_secret_id, private_key_file, private_key_passphrase, public_key_fingerprint, should_use_resource_principal): kwargs = {} kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id']) @@ -4320,6 +4306,12 @@ def create_connection_create_oracle_ai_data_platform_connection_details(ctx, fro if private_key_passphrase_secret_id is not None: _details['privateKeyPassphraseSecretId'] = private_key_passphrase_secret_id + if private_key_file is not None: + _details['privateKeyFile'] = private_key_file + + if private_key_passphrase is not None: + _details['privateKeyPassphrase'] = private_key_passphrase + if public_key_fingerprint is not None: _details['publicKeyFingerprint'] = public_key_fingerprint @@ -5251,9 +5243,6 @@ def create_connection_create_iceberg_connection_details(ctx, from_json, wait_for @cli_util.option('--ssl-cert', help=u"""Client Certificate - The base64 encoded content of a .pem or .crt file containing the client public key (for 2-way SSL). It is not included in GET responses if the `view=COMPACT` query parameter is specified.""") @cli_util.option('--ssl-key', help=u"""Client Key - The base64 encoded content of a .pem or .crt file containing the client private key (for 2-way SSL). Deprecated: This field is deprecated and replaced by \"sslKeySecretId\". This field will be removed after February 15 2026.""") @cli_util.option('--ssl-key-secret-id', help=u"""The [OCID] of the Secret that stores the Client Key - The content of a .pem or .crt file containing the client private key (for 2-way SSL). Note: When provided, 'sslKey' field must not be provided.""") -@cli_util.option('--private-ip', help=u"""Deprecated: this field will be removed in future versions. Either specify the private IP in the connectionString or host field, or make sure the host name is resolvable in the target VCN. - -The private IP address of the connection's endpoint in the customer's VCN, typically a database endpoint or a big data endpoint (e.g. Kafka bootstrap server). In case the privateIp is provided, the subnetId must also be provided. In case the privateIp (and the subnetId) is not provided it is assumed the datasource is publicly accessible. In case the connection is accessible only privately, the lack of privateIp will result in not being able to access the connection.""") @cli_util.option('--additional-attributes', type=custom_types.CLI_COMPLEX_TYPE, help=u"""An array of name-value pair attribute entries. Used as additional parameters in connection string. This option is a JSON list with items of type NameValuePair. For documentation on NameValuePair please see our API reference: https://docs.oracle.com/en-us/iaas/api/#/en/goldengate/20200407/datatypes/NameValuePair.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP) @@ -5266,7 +5255,7 @@ def create_connection_create_iceberg_connection_details(ctx, from_json, wait_for @click.pass_context @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'freeform-tags': {'module': 'golden_gate', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'golden_gate', 'class': 'dict(str, dict(str, object))'}, 'locks': {'module': 'golden_gate', 'class': 'list[AddResourceLockDetails]'}, 'nsg-ids': {'module': 'golden_gate', 'class': 'list[string]'}, 'security-attributes': {'module': 'golden_gate', 'class': 'dict(str, dict(str, object))'}, 'additional-attributes': {'module': 'golden_gate', 'class': 'list[NameValuePair]'}}, output_type={'module': 'golden_gate', 'class': 'Connection'}) @cli_util.wrap_exceptions -def create_connection_create_mysql_connection_details(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, display_name, compartment_id, technology_type, username, database_name, security_protocol, description, freeform_tags, defined_tags, locks, vault_id, key_id, nsg_ids, subnet_id, routing_method, does_use_secret_ids, subscription_id, cluster_placement_group_id, security_attributes, password, password_secret_id, host, port, ssl_mode, ssl_ca, ssl_crl, ssl_cert, ssl_key, ssl_key_secret_id, private_ip, additional_attributes, db_system_id): +def create_connection_create_mysql_connection_details(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, display_name, compartment_id, technology_type, username, database_name, security_protocol, description, freeform_tags, defined_tags, locks, vault_id, key_id, nsg_ids, subnet_id, routing_method, does_use_secret_ids, subscription_id, cluster_placement_group_id, security_attributes, password, password_secret_id, host, port, ssl_mode, ssl_ca, ssl_crl, ssl_cert, ssl_key, ssl_key_secret_id, additional_attributes, db_system_id): kwargs = {} kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id']) @@ -5348,9 +5337,6 @@ def create_connection_create_mysql_connection_details(ctx, from_json, wait_for_s if ssl_key_secret_id is not None: _details['sslKeySecretId'] = ssl_key_secret_id - if private_ip is not None: - _details['privateIp'] = private_ip - if additional_attributes is not None: _details['additionalAttributes'] = cli_util.parse_json_parameter("additional_attributes", additional_attributes) @@ -5549,10 +5535,11 @@ def create_connection_create_generic_connection_details(ctx, from_json, wait_for @cli_util.option('--authentication-mode', help=u"""Authentication mode. It can be provided at creation of Oracle Autonomous Database Serverless connections, when a databaseId is provided. The default value is MTLS.""") @cli_util.option('--wallet', help=u"""The wallet contents Oracle GoldenGate uses to make connections to a database. This attribute is expected to be base64 encoded. Deprecated: This field is deprecated and replaced by \"walletSecretId\". This field will be removed after February 15 2026.""") @cli_util.option('--wallet-secret-id', help=u"""The [OCID] of the Secret where the wallet file is stored. The wallet contents Oracle GoldenGate uses to make connections to a database. Note: When provided, 'wallet' field must not be provided.""") -@cli_util.option('--session-mode', help=u"""The mode of the database connection session to be established by the data client. 'REDIRECT' - for a RAC database, 'DIRECT' - for a non-RAC database. Connection to a RAC database involves a redirection received from the SCAN listeners to the database node to connect to. By default the mode would be DIRECT.""") -@cli_util.option('--private-ip', help=u"""Deprecated: this field will be removed in future versions. Either specify the private IP in the connectionString or host field, or make sure the host name is resolvable in the target VCN. +@cli_util.option('--session-mode', help=u"""Specifies the session mode for the database connection. Use REDIRECT only for RAC databases with SCAN listeners that return IP addresses. For RAC databases with SCAN listeners that return FQDNs, and for all other Oracle database technologies, use DIRECT. In RAC deployments, SCAN listeners redirects a connection to a specific database node, identified by either IP address or FQDN. It is recommended to configure RAC with FQDN-based SCAN listeners. + +The default is DIRECT, except when databaseId is provided and the discovered database relies on the SCAN listener. In this case, the default is REDIRECT. -The private IP address of the connection's endpoint in the customer's VCN, typically a database endpoint or a big data endpoint (e.g. Kafka bootstrap server). In case the privateIp is provided, the subnetId must also be provided. In case the privateIp (and the subnetId) is not provided it is assumed the datasource is publicly accessible. In case the connection is accessible only privately, the lack of privateIp will result in not being able to access the connection.""") +Deprecated: Defaulting to the REDIRECT session mode will be removed after March 1, 2027.""") @cli_util.option('--database-id', help=u"""The [OCID] of the database being referenced.""") @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "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.""") @@ -5562,7 +5549,7 @@ def create_connection_create_generic_connection_details(ctx, from_json, wait_for @click.pass_context @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'freeform-tags': {'module': 'golden_gate', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'golden_gate', 'class': 'dict(str, dict(str, object))'}, 'locks': {'module': 'golden_gate', 'class': 'list[AddResourceLockDetails]'}, 'nsg-ids': {'module': 'golden_gate', 'class': 'list[string]'}, 'security-attributes': {'module': 'golden_gate', 'class': 'dict(str, dict(str, object))'}}, output_type={'module': 'golden_gate', 'class': 'Connection'}) @cli_util.wrap_exceptions -def create_connection_create_oracle_connection_details(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, display_name, compartment_id, technology_type, username, description, freeform_tags, defined_tags, locks, vault_id, key_id, nsg_ids, subnet_id, routing_method, does_use_secret_ids, subscription_id, cluster_placement_group_id, security_attributes, password, password_secret_id, connection_string, authentication_mode, wallet, wallet_secret_id, session_mode, private_ip, database_id): +def create_connection_create_oracle_connection_details(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, display_name, compartment_id, technology_type, username, description, freeform_tags, defined_tags, locks, vault_id, key_id, nsg_ids, subnet_id, routing_method, does_use_secret_ids, subscription_id, cluster_placement_group_id, security_attributes, password, password_secret_id, connection_string, authentication_mode, wallet, wallet_secret_id, session_mode, database_id): kwargs = {} kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id']) @@ -5633,9 +5620,6 @@ def create_connection_create_oracle_connection_details(ctx, from_json, wait_for_ if session_mode is not None: _details['sessionMode'] = session_mode - if private_ip is not None: - _details['privateIp'] = private_ip - if database_id is not None: _details['databaseId'] = database_id @@ -5707,9 +5691,6 @@ def create_connection_create_oracle_connection_details(ctx, from_json, wait_for_ @cli_util.option('--username', help=u"""The username credential existing in the Oracle GoldenGate used to be connected to.""") @cli_util.option('--password', help=u"""The password used to connect to the Oracle GoldenGate accessed trough this connection. Deprecated: This field is deprecated and replaced by \"passwordSecretId\". This field will be removed after February 15 2026.""") @cli_util.option('--password-secret-id', help=u"""The [OCID] of the Secret where the password is stored, which is used to connect to the Oracle GoldenGate accessed trough this connection. Note: When provided, 'password' field must not be provided.""") -@cli_util.option('--private-ip', help=u"""Deprecated: this field will be removed in future versions. Either specify the private IP in the connectionString or host field, or make sure the host name is resolvable in the target VCN. - -The private IP address of the connection's endpoint in the customer's VCN, typically a database endpoint or a big data endpoint (e.g. Kafka bootstrap server). In case the privateIp is provided, the subnetId must also be provided. In case the privateIp (and the subnetId) is not provided it is assumed the datasource is publicly accessible. In case the connection is accessible only privately, the lack of privateIp will result in not being able to access the connection.""") @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "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.""") @@ -5718,7 +5699,7 @@ def create_connection_create_oracle_connection_details(ctx, from_json, wait_for_ @click.pass_context @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'freeform-tags': {'module': 'golden_gate', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'golden_gate', 'class': 'dict(str, dict(str, object))'}, 'locks': {'module': 'golden_gate', 'class': 'list[AddResourceLockDetails]'}, 'nsg-ids': {'module': 'golden_gate', 'class': 'list[string]'}, 'security-attributes': {'module': 'golden_gate', 'class': 'dict(str, dict(str, object))'}}, output_type={'module': 'golden_gate', 'class': 'Connection'}) @cli_util.wrap_exceptions -def create_connection_create_golden_gate_connection_details(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, display_name, compartment_id, technology_type, description, freeform_tags, defined_tags, locks, vault_id, key_id, nsg_ids, subnet_id, routing_method, does_use_secret_ids, subscription_id, cluster_placement_group_id, security_attributes, deployment_id, host, port, username, password, password_secret_id, private_ip): +def create_connection_create_golden_gate_connection_details(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, display_name, compartment_id, technology_type, description, freeform_tags, defined_tags, locks, vault_id, key_id, nsg_ids, subnet_id, routing_method, does_use_secret_ids, subscription_id, cluster_placement_group_id, security_attributes, deployment_id, host, port, username, password, password_secret_id): kwargs = {} kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id']) @@ -5785,9 +5766,6 @@ def create_connection_create_golden_gate_connection_details(ctx, from_json, wait if password_secret_id is not None: _details['passwordSecretId'] = password_secret_id - if private_ip is not None: - _details['privateIp'] = private_ip - _details['connectionType'] = 'GOLDENGATE' client = cli_util.build_client('golden_gate', 'golden_gate', ctx) @@ -6154,7 +6132,11 @@ def create_database_registration(ctx, from_json, wait_for_state, max_wait_second This option is a JSON list with items of type AddResourceLockDetails. For documentation on AddResourceLockDetails please see our API reference: https://docs.oracle.com/en-us/iaas/api/#/en/goldengate/20200407/datatypes/AddResourceLockDetails.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP) @cli_util.option('--deployment-backup-id', help=u"""The [OCID] of the backup being referenced.""") -@cli_util.option('--load-balancer-subnet-id', help=u"""The [OCID] of a public subnet in the customer tenancy. Can be provided only for public deployments. If provided, the loadbalancer will be created in this subnet instead of the service tenancy. For backward compatibility, this is an optional property. It will become mandatory for public deployments after October 1, 2024.""") +@cli_util.option('--load-balancer-subnet-id', help=u"""The [OCID] of a public subnet in the customer tenancy used to host the public load balancer of the deployment. + +Rules: - Create: Mandatory when isPublic is true. Must be a public, regional subnet in the same VCN as subnetId. - Update: - For public deployments, this property must be present and is immutable once set (cannot be changed to a different subnet). - Legacy exception: a public deployment created without this property may continue to be updated without providing it; once set, it becomes immutable. + +Validation: - Must reference a public subnet. - Must be a regional subnet. - Must be in the same VCN as subnetId.""") @cli_util.option('--fqdn', help=u"""A three-label Fully Qualified Domain Name (FQDN) for a resource.""") @cli_util.option('--nsg-ids', type=custom_types.CLI_COMPLEX_TYPE, help=u"""An array of Network Security Group OCIDs used to define network access for either Deployments or Connections.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP) @cli_util.option('--is-public', type=click.BOOL, help=u"""True if this object is publicly available.""") @@ -7599,7 +7581,7 @@ def list_connection_assignments(ctx, from_json, all_pages, page_size, compartmen @connection_group.command(name=cli_util.override('goldengate.list_connections.command_name', 'list'), help=u"""Lists the Connections in the compartment. \n[Command Reference](listConnections)""") @cli_util.option('--compartment-id', required=True, help=u"""The OCID of the compartment that contains the work request. Work requests should be scoped to the same compartment as the resource the work request affects. If the work request concerns multiple resources, and those resources are not in the same compartment, it is up to the service team to pick the primary resource whose compartment should be used.""") -@cli_util.option('--technology-type', type=custom_types.CliCaseInsensitiveChoice(["GOLDENGATE", "GENERIC", "OCI_AUTONOMOUS_DATABASE", "OCI_AUTONOMOUS_JSON_DATABASE", "OCI_CACHE_WITH_REDIS", "OCI_MYSQL", "OCI_OBJECT_STORAGE", "OCI_POSTGRESQL", "OCI_STREAMING", "OCI_STREAMING_WITH_APACHE_KAFKA", "ORACLE_DATABASE", "ORACLE_EXADATA", "ORACLE_EXADATA_DATABASE_AT_AZURE", "ORACLE_AUTONOMOUS_DATABASE_AT_AZURE", "ORACLE_JSON_COLLECTION", "ORACLE_EXADATA_DATABASE_AT_GOOGLE_CLOUD", "ORACLE_AUTONOMOUS_DATABASE_AT_GOOGLE_CLOUD", "ORACLE_EXADATA_DATABASE_AT_AWS", "ORACLE_AUTONOMOUS_DATABASE_AT_AWS", "ORACLE_AI_DATA_PLATFORM", "ORACLE_NOSQL", "ORACLE_REST_DATA_SERVICES", "ORACLE_WEBLOGIC_JMS", "AMAZON_RDS_ORACLE", "AMAZON_RDS_SQLSERVER", "AMAZON_S3", "AMAZON_AURORA_MYSQL", "AMAZON_AURORA_POSTGRESQL", "AMAZON_DOCUMENT_DB", "AMAZON_KINESIS", "AMAZON_REDSHIFT", "AMAZON_RDS_MARIADB", "AMAZON_RDS_MYSQL", "AMAZON_RDS_POSTGRESQL", "APACHE_ICEBERG", "APACHE_KAFKA", "AZURE_COSMOS_DB_FOR_MONGODB", "AZURE_COSMOS_DB_FOR_POSTGRESQL", "AZURE_DATA_LAKE_STORAGE", "AZURE_EVENT_HUBS", "AZURE_MYSQL", "AZURE_POSTGRESQL", "AZURE_SQLSERVER_MANAGED_INSTANCE", "AZURE_SQLSERVER_NON_MANAGED_INSTANCE", "AZURE_SYNAPSE_ANALYTICS", "CONFLUENT_KAFKA", "CONFLUENT_SCHEMA_REGISTRY", "DATABRICKS", "DB2_I", "DB2_ZOS", "ELASTICSEARCH", "GOOGLE_ALLOY_DB_FOR_POSTGRESQL", "GOOGLE_BIGQUERY", "GOOGLE_CLOUD_STORAGE", "GOOGLE_CLOUD_SQL_MYSQL", "GOOGLE_CLOUD_SQL_POSTGRESQL", "GOOGLE_CLOUD_SQL_SQLSERVER", "GOOGLE_PUBSUB", "HDFS", "MARIADB", "MICROSOFT_SQLSERVER", "MICROSOFT_FABRIC_LAKEHOUSE", "MICROSOFT_FABRIC_MIRROR", "MONGODB", "MYSQL_SERVER", "MYSQL_HEATWAVE_ON_AZURE", "MYSQL_HEATWAVE_ON_AWS", "POSTGRESQL_SERVER", "REDIS", "SINGLESTOREDB", "SINGLESTOREDB_CLOUD", "SNOWFLAKE"]), multiple=True, help=u"""The array of technology types.""") +@cli_util.option('--technology-type', type=custom_types.CliCaseInsensitiveChoice(["GOLDENGATE", "GENERIC", "OCI_AUTONOMOUS_DATABASE", "OCI_AUTONOMOUS_JSON_DATABASE", "OCI_CACHE_WITH_REDIS", "OCI_MYSQL", "OCI_OBJECT_STORAGE", "OCI_POSTGRESQL", "OCI_STREAMING", "OCI_STREAMING_WITH_APACHE_KAFKA", "ORACLE_DATABASE", "ORACLE_EXADATA", "ORACLE_EXADATA_DATABASE_AT_AZURE", "ORACLE_AUTONOMOUS_DATABASE_AT_AZURE", "ORACLE_JSON_COLLECTION", "ORACLE_EXADATA_DATABASE_AT_GOOGLE_CLOUD", "ORACLE_AUTONOMOUS_DATABASE_AT_GOOGLE_CLOUD", "ORACLE_EXADATA_DATABASE_AT_AWS", "ORACLE_AUTONOMOUS_DATABASE_AT_AWS", "ORACLE_AI_DATA_PLATFORM", "ORACLE_NOSQL", "ORACLE_REST_DATA_SERVICES", "ORACLE_WEBLOGIC_JMS", "AMAZON_RDS_ORACLE", "AMAZON_RDS_SQLSERVER", "AMAZON_S3", "AMAZON_AURORA_MYSQL", "AMAZON_AURORA_POSTGRESQL", "AMAZON_DOCUMENT_DB", "AMAZON_KINESIS", "AMAZON_REDSHIFT", "AMAZON_RDS_MARIADB", "AMAZON_RDS_MYSQL", "AMAZON_RDS_POSTGRESQL", "APACHE_ICEBERG", "APACHE_KAFKA", "AZURE_COSMOS_DB_FOR_MONGODB", "AZURE_COSMOS_DB_FOR_POSTGRESQL", "AZURE_DATA_LAKE_STORAGE", "AZURE_EVENT_HUBS", "AZURE_MYSQL", "AZURE_POSTGRESQL", "AZURE_SQLSERVER_MANAGED_INSTANCE", "AZURE_SQLSERVER_NON_MANAGED_INSTANCE", "AZURE_SYNAPSE_ANALYTICS", "CONFLUENT_KAFKA", "CONFLUENT_SCHEMA_REGISTRY", "DATABRICKS", "DB2_I", "DB2_ZOS", "ELASTICSEARCH", "EDB_POSTGRES_ADVANCED_SERVER", "GOOGLE_ALLOY_DB_FOR_POSTGRESQL", "GOOGLE_BIGQUERY", "GOOGLE_CLOUD_STORAGE", "GOOGLE_CLOUD_SQL_MYSQL", "GOOGLE_CLOUD_SQL_POSTGRESQL", "GOOGLE_CLOUD_SQL_SQLSERVER", "GOOGLE_PUBSUB", "HDFS", "MARIADB", "MICROSOFT_SQLSERVER", "MICROSOFT_FABRIC_EVENTSTREAM", "MICROSOFT_FABRIC_LAKEHOUSE", "MICROSOFT_FABRIC_MIRROR", "MONGODB", "MYSQL_SERVER", "MYSQL_HEATWAVE_ON_AZURE", "MYSQL_HEATWAVE_ON_AWS", "POSTGRESQL_SERVER", "REDIS", "SINGLESTOREDB", "SINGLESTOREDB_CLOUD", "SNOWFLAKE", "YUGABYTE_DB"]), multiple=True, help=u"""The array of technology types.""") @cli_util.option('--connection-type', type=custom_types.CliCaseInsensitiveChoice(["GOLDENGATE", "KAFKA", "KAFKA_SCHEMA_REGISTRY", "MYSQL", "JAVA_MESSAGE_SERVICE", "MICROSOFT_SQLSERVER", "OCI_OBJECT_STORAGE", "ORACLE", "AZURE_DATA_LAKE_STORAGE", "POSTGRESQL", "AZURE_SYNAPSE_ANALYTICS", "SNOWFLAKE", "AMAZON_S3", "HDFS", "ORACLE_AI_DATA_PLATFORM", "ORACLE_NOSQL", "MONGODB", "AMAZON_KINESIS", "AMAZON_REDSHIFT", "DB2", "REDIS", "ELASTICSEARCH", "GENERIC", "GOOGLE_CLOUD_STORAGE", "GOOGLE_BIGQUERY", "DATABRICKS", "GOOGLE_PUBSUB", "MICROSOFT_FABRIC", "ICEBERG"]), multiple=True, help=u"""The array of connection types.""") @cli_util.option('--assigned-deployment-id', help=u"""The OCID of the deployment which for the connection must be assigned.""") @cli_util.option('--assignable-deployment-id', help=u"""Filters for compatible connections which can be, but currently not assigned to the deployment specified by its id.""") @@ -7735,7 +7717,7 @@ def list_database_registrations(ctx, from_json, all_pages, page_size, compartmen @deployment_backup_group.command(name=cli_util.override('goldengate.list_deployment_backups.command_name', 'list'), help=u"""Lists the Backups in a compartment. \n[Command Reference](listDeploymentBackups)""") @cli_util.option('--compartment-id', required=True, help=u"""The OCID of the compartment that contains the work request. Work requests should be scoped to the same compartment as the resource the work request affects. If the work request concerns multiple resources, and those resources are not in the same compartment, it is up to the service team to pick the primary resource whose compartment should be used.""") @cli_util.option('--deployment-id', help=u"""The [OCID] of the deployment in which to list resources.""") -@cli_util.option('--lifecycle-state', type=custom_types.CliCaseInsensitiveChoice(["CREATING", "UPDATING", "ACTIVE", "INACTIVE", "DELETING", "DELETED", "FAILED", "NEEDS_ATTENTION", "IN_PROGRESS", "CANCELING", "CANCELED", "SUCCEEDED", "WAITING"]), help=u"""A filter to return only the resources that match the 'lifecycleState' given.""") +@cli_util.option('--lifecycle-state', type=custom_types.CliCaseInsensitiveChoice(["CREATING", "ACTIVE", "DELETING", "DELETED", "FAILED", "CANCELING", "CANCELED"]), help=u"""A filter to return only the deployment backups having the 'lifecycleState' given.""") @cli_util.option('--display-name', help=u"""A filter to return only the resources that match the entire 'displayName' given.""") @cli_util.option('--limit', type=click.INT, help=u"""The maximum number of items to return.""") @cli_util.option('--page', help=u"""The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call.""") @@ -7851,7 +7833,7 @@ def list_deployment_environments(ctx, from_json, all_pages, page_size, compartme @deployment_peer_summary_group.command(name=cli_util.override('goldengate.list_deployment_peers.command_name', 'list-deployment-peers'), help=u"""Lists the local and remote peers in a deployment. \n[Command Reference](listDeploymentPeers)""") @cli_util.option('--deployment-id', required=True, help=u"""A unique Deployment identifier.""") -@cli_util.option('--lifecycle-state', type=custom_types.CliCaseInsensitiveChoice(["CREATING", "UPDATING", "ACTIVE", "INACTIVE", "DELETING", "DELETED", "FAILED", "NEEDS_ATTENTION", "IN_PROGRESS", "CANCELING", "CANCELED", "SUCCEEDED", "WAITING"]), help=u"""A filter to return only the resources that match the 'lifecycleState' given.""") +@cli_util.option('--lifecycle-state', type=custom_types.CliCaseInsensitiveChoice(["CREATING", "ACTIVE", "FAILED", "UPDATING", "DELETING"]), help=u"""A filter to return only the deployment peers having the 'lifecycleState' given.""") @cli_util.option('--display-name', help=u"""A filter to return only the resources that match the entire 'displayName' given.""") @cli_util.option('--limit', type=click.INT, help=u"""The maximum number of items to return.""") @cli_util.option('--page', help=u"""The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call.""") @@ -7978,7 +7960,7 @@ def list_deployment_types(ctx, from_json, all_pages, page_size, compartment_id, @deployment_upgrade_group.command(name=cli_util.override('goldengate.list_deployment_upgrades.command_name', 'list'), help=u"""Lists the Deployment Upgrades in a compartment. \n[Command Reference](listDeploymentUpgrades)""") @cli_util.option('--compartment-id', required=True, help=u"""The OCID of the compartment that contains the work request. Work requests should be scoped to the same compartment as the resource the work request affects. If the work request concerns multiple resources, and those resources are not in the same compartment, it is up to the service team to pick the primary resource whose compartment should be used.""") @cli_util.option('--deployment-id', help=u"""The [OCID] of the deployment in which to list resources.""") -@cli_util.option('--lifecycle-state', type=custom_types.CliCaseInsensitiveChoice(["CREATING", "UPDATING", "ACTIVE", "INACTIVE", "DELETING", "DELETED", "FAILED", "NEEDS_ATTENTION", "IN_PROGRESS", "CANCELING", "CANCELED", "SUCCEEDED", "WAITING"]), help=u"""A filter to return only the resources that match the 'lifecycleState' given.""") +@cli_util.option('--lifecycle-state', type=custom_types.CliCaseInsensitiveChoice(["WAITING", "IN_PROGRESS", "FAILED", "SUCCEEDED", "CANCELED"]), help=u"""A filter to return only the deployment upgrades having the 'lifecycleState' given.""") @cli_util.option('--display-name', help=u"""A filter to return only the resources that match the entire 'displayName' given.""") @cli_util.option('--limit', type=click.INT, help=u"""The maximum number of items to return.""") @cli_util.option('--page', help=u"""The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call.""") @@ -8163,7 +8145,7 @@ def list_deployment_wallets_operations(ctx, from_json, all_pages, page_size, dep @cli_util.option('--supported-connection-type', type=custom_types.CliCaseInsensitiveChoice(["GOLDENGATE", "KAFKA", "KAFKA_SCHEMA_REGISTRY", "MYSQL", "JAVA_MESSAGE_SERVICE", "MICROSOFT_SQLSERVER", "OCI_OBJECT_STORAGE", "ORACLE", "AZURE_DATA_LAKE_STORAGE", "POSTGRESQL", "AZURE_SYNAPSE_ANALYTICS", "SNOWFLAKE", "AMAZON_S3", "HDFS", "ORACLE_AI_DATA_PLATFORM", "ORACLE_NOSQL", "MONGODB", "AMAZON_KINESIS", "AMAZON_REDSHIFT", "DB2", "REDIS", "ELASTICSEARCH", "GENERIC", "GOOGLE_CLOUD_STORAGE", "GOOGLE_BIGQUERY", "DATABRICKS", "GOOGLE_PUBSUB", "MICROSOFT_FABRIC", "ICEBERG"]), help=u"""The connection type which the deployment must support.""") @cli_util.option('--assigned-connection-id', help=u"""The OCID of the connection which for the deployment must be assigned.""") @cli_util.option('--assignable-connection-id', help=u"""Return the deployments to which the specified connectionId may be assigned.""") -@cli_util.option('--lifecycle-state', type=custom_types.CliCaseInsensitiveChoice(["CREATING", "UPDATING", "ACTIVE", "INACTIVE", "DELETING", "DELETED", "FAILED", "NEEDS_ATTENTION", "IN_PROGRESS", "CANCELING", "CANCELED", "SUCCEEDED", "WAITING"]), help=u"""A filter to return only the resources that match the 'lifecycleState' given.""") +@cli_util.option('--lifecycle-state', type=custom_types.CliCaseInsensitiveChoice(["CREATING", "UPDATING", "ACTIVE", "INACTIVE", "DELETING", "DELETED", "FAILED", "NEEDS_ATTENTION"]), help=u"""A filter to return only the deployments having the 'lifecycleState' given.""") @cli_util.option('--lifecycle-sub-state', type=custom_types.CliCaseInsensitiveChoice(["RECOVERING", "STARTING", "STOPPING", "MOVING", "UPGRADING", "RESTORING", "BACKUP_IN_PROGRESS", "ROLLBACK_IN_PROGRESS"]), help=u"""A filter to return only the resources that match the 'lifecycleSubState' given.""") @cli_util.option('--deployment-type', type=custom_types.CliCaseInsensitiveChoice(["OGG", "DATABASE_ORACLE", "BIGDATA", "DATABASE_MICROSOFT_SQLSERVER", "DATABASE_MYSQL", "DATABASE_POSTGRESQL", "DATABASE_DB2ZOS", "DATABASE_DB2I", "GGSA", "DATA_TRANSFORMS"]), help=u"""A filter that returns only the resources matching the specified 'deploymentType'.""") @cli_util.option('--display-name', help=u"""A filter to return only the resources that match the entire 'displayName' given.""") @@ -8892,6 +8874,140 @@ def list_work_requests(ctx, from_json, all_pages, page_size, compartment_id, res cli_util.render_response(result, ctx) +@connection_group.command(name=cli_util.override('goldengate.migrate_connection.command_name', 'migrate'), help=u"""Migrate Connection attributes. \n[Command Reference](migrateConnection)""") +@cli_util.option('--connection-id', required=True, help=u"""The [OCID] of a Connection.""") +@cli_util.option('--type', required=True, type=custom_types.CliCaseInsensitiveChoice(["SECRET"]), help=u"""The type of a migrate Connection.""") +@cli_util.option('--if-match', help=u"""For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource is updated or deleted only if the etag you provide matches the resource's current etag value.""") +@cli_util.option('--is-lock-override', type=click.BOOL, help=u"""Whether to override locks (if any exist).""") +@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "CANCELED"]), multiple=True, help="""This operation asynchronously creates, modifies or deletes a resource and uses a work request to track the progress of the operation. Specify this option to perform the action and then wait until the work request reaches a certain state. Multiple states can be specified, returning on the first state. For example, --wait-for-state ACCEPTED --wait-for-state CANCELED would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.""") +@cli_util.option('--max-wait-seconds', type=click.INT, help="""The maximum time to wait for the work request to reach the state defined by --wait-for-state. Defaults to 1200 seconds.""") +@cli_util.option('--wait-interval-seconds', type=click.INT, help="""Check every --wait-interval-seconds to see whether the work request has reached the state defined by --wait-for-state. Defaults to 30 seconds.""") +@json_skeleton_utils.get_cli_json_input_option({}) +@cli_util.help_option +@click.pass_context +@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}) +@cli_util.wrap_exceptions +def migrate_connection(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, connection_id, type, if_match, is_lock_override): + + if isinstance(connection_id, six.string_types) and len(connection_id.strip()) == 0: + raise click.UsageError('Parameter --connection-id cannot be whitespace or empty string') + + kwargs = {} + if if_match is not None: + kwargs['if_match'] = if_match + if is_lock_override is not None: + kwargs['is_lock_override'] = is_lock_override + kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id']) + + _details = {} + _details['type'] = type + + client = cli_util.build_client('golden_gate', 'golden_gate', ctx) + result = client.migrate_connection( + connection_id=connection_id, + migrate_connection_details=_details, + **kwargs + ) + if wait_for_state: + + if hasattr(client, 'get_work_request') and callable(getattr(client, 'get_work_request')): + try: + wait_period_kwargs = {} + if max_wait_seconds is not None: + wait_period_kwargs['max_wait_seconds'] = max_wait_seconds + if wait_interval_seconds is not None: + wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds + if 'opc-work-request-id' not in result.headers: + click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state') + cli_util.render_response(result, ctx) + return + + click.echo('Action completed. Waiting until the work request has entered state: {}'.format(wait_for_state), file=sys.stderr) + result = oci.wait_until(client, client.get_work_request(result.headers['opc-work-request-id']), 'status', wait_for_state, **wait_period_kwargs) + except oci.exceptions.MaximumWaitTimeExceeded as e: + # If we fail, we should show an error, but we should still provide the information to the customer + click.echo('Failed to wait until the work request entered the specified state. Outputting last known resource state', file=sys.stderr) + cli_util.render_response(result, ctx) + sys.exit(2) + except Exception: + click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state', file=sys.stderr) + cli_util.render_response(result, ctx) + raise + else: + click.echo('Unable to wait for the work request to enter the specified state', file=sys.stderr) + cli_util.render_response(result, ctx) + + +@connection_group.command(name=cli_util.override('goldengate.migrate_connection_secret_migrate_connection_details.command_name', 'migrate-connection-secret-migrate-connection-details'), help=u"""Migrate Connection attributes. \n[Command Reference](migrateConnection)""") +@cli_util.option('--connection-id', required=True, help=u"""The [OCID] of a Connection.""") +@cli_util.option('--secret-compartment-id', required=True, help=u"""The [OCID] of the compartment being referenced.""") +@cli_util.option('--vault-id', required=True, help=u"""Refers to the customer's vault OCID. If provided, it references a vault where GoldenGate can manage secrets. Customers must add policies to permit GoldenGate to manage secrets contained within this vault.""") +@cli_util.option('--key-id', required=True, help=u"""Refers to the customer's master key OCID. If provided, it references a key to manage secrets. Customers must add policies to permit GoldenGate to use this key.""") +@cli_util.option('--if-match', help=u"""For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource is updated or deleted only if the etag you provide matches the resource's current etag value.""") +@cli_util.option('--is-lock-override', type=click.BOOL, help=u"""Whether to override locks (if any exist).""") +@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "CANCELED"]), multiple=True, help="""This operation asynchronously creates, modifies or deletes a resource and uses a work request to track the progress of the operation. Specify this option to perform the action and then wait until the work request reaches a certain state. Multiple states can be specified, returning on the first state. For example, --wait-for-state ACCEPTED --wait-for-state CANCELED would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.""") +@cli_util.option('--max-wait-seconds', type=click.INT, help="""The maximum time to wait for the work request to reach the state defined by --wait-for-state. Defaults to 1200 seconds.""") +@cli_util.option('--wait-interval-seconds', type=click.INT, help="""Check every --wait-interval-seconds to see whether the work request has reached the state defined by --wait-for-state. Defaults to 30 seconds.""") +@json_skeleton_utils.get_cli_json_input_option({}) +@cli_util.help_option +@click.pass_context +@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}) +@cli_util.wrap_exceptions +def migrate_connection_secret_migrate_connection_details(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, connection_id, secret_compartment_id, vault_id, key_id, if_match, is_lock_override): + + if isinstance(connection_id, six.string_types) and len(connection_id.strip()) == 0: + raise click.UsageError('Parameter --connection-id cannot be whitespace or empty string') + + kwargs = {} + if if_match is not None: + kwargs['if_match'] = if_match + if is_lock_override is not None: + kwargs['is_lock_override'] = is_lock_override + kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id']) + + _details = {} + _details['secretCompartmentId'] = secret_compartment_id + _details['vaultId'] = vault_id + _details['keyId'] = key_id + + _details['type'] = 'SECRET' + + client = cli_util.build_client('golden_gate', 'golden_gate', ctx) + result = client.migrate_connection( + connection_id=connection_id, + migrate_connection_details=_details, + **kwargs + ) + if wait_for_state: + + if hasattr(client, 'get_work_request') and callable(getattr(client, 'get_work_request')): + try: + wait_period_kwargs = {} + if max_wait_seconds is not None: + wait_period_kwargs['max_wait_seconds'] = max_wait_seconds + if wait_interval_seconds is not None: + wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds + if 'opc-work-request-id' not in result.headers: + click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state') + cli_util.render_response(result, ctx) + return + + click.echo('Action completed. Waiting until the work request has entered state: {}'.format(wait_for_state), file=sys.stderr) + result = oci.wait_until(client, client.get_work_request(result.headers['opc-work-request-id']), 'status', wait_for_state, **wait_period_kwargs) + except oci.exceptions.MaximumWaitTimeExceeded as e: + # If we fail, we should show an error, but we should still provide the information to the customer + click.echo('Failed to wait until the work request entered the specified state. Outputting last known resource state', file=sys.stderr) + cli_util.render_response(result, ctx) + sys.exit(2) + except Exception: + click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state', file=sys.stderr) + cli_util.render_response(result, ctx) + raise + else: + click.echo('Unable to wait for the work request to enter the specified state', file=sys.stderr) + cli_util.render_response(result, ctx) + + @pipeline_group.command(name=cli_util.override('goldengate.pause_pipeline.command_name', 'pause'), help=u"""Pauses the pipeline. \n[Command Reference](pausePipeline)""") @cli_util.option('--pipeline-id', required=True, help=u"""The [OCID] of the pipeline created.""") @cli_util.option('--type', required=True, type=custom_types.CliCaseInsensitiveChoice(["DEFAULT"]), help=u"""Type of a pipeline pause. This option applies when pausing a pipeline.""") @@ -9209,7 +9325,7 @@ def remove_connection_lock(ctx, from_json, wait_for_state, max_wait_seconds, wai @cli_util.option('--deployment-backup-id', required=True, help=u"""A unique DeploymentBackup identifier.""") @cli_util.option('--type', required=True, type=custom_types.CliCaseInsensitiveChoice(["FULL", "DELETE"]), help=u"""Type of the lock.""") @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(["CREATING", "UPDATING", "ACTIVE", "INACTIVE", "DELETING", "DELETED", "FAILED", "NEEDS_ATTENTION", "IN_PROGRESS", "CANCELING", "CANCELED", "SUCCEEDED", "WAITING"]), 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 WAITING would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.""") +@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["CREATING", "ACTIVE", "DELETING", "DELETED", "FAILED", "CANCELING", "CANCELED"]), 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 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 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({}) @@ -9329,7 +9445,7 @@ def remove_deployment_local_peer(ctx, from_json, wait_for_state, max_wait_second @cli_util.option('--deployment-id', required=True, help=u"""A unique Deployment identifier.""") @cli_util.option('--type', required=True, type=custom_types.CliCaseInsensitiveChoice(["FULL", "DELETE"]), help=u"""Type of the lock.""") @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(["CREATING", "UPDATING", "ACTIVE", "INACTIVE", "DELETING", "DELETED", "FAILED", "NEEDS_ATTENTION", "IN_PROGRESS", "CANCELING", "CANCELED", "SUCCEEDED", "WAITING"]), 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 WAITING would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.""") +@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["CREATING", "UPDATING", "ACTIVE", "INACTIVE", "DELETING", "DELETED", "FAILED", "NEEDS_ATTENTION"]), 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 NEEDS_ATTENTION 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({}) @@ -9386,7 +9502,7 @@ def remove_deployment_lock(ctx, from_json, wait_for_state, max_wait_seconds, wai @cli_util.option('--deployment-upgrade-id', required=True, help=u"""A unique Deployment Upgrade identifier.""") @cli_util.option('--type', required=True, type=custom_types.CliCaseInsensitiveChoice(["RESCHEDULE_TO_DATE"]), help=u"""The type of a deploymentUpgrade reschedule.""") @cli_util.option('--if-match', help=u"""For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource is updated or deleted only if the etag you provide matches the resource's current etag value.""") -@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["CREATING", "UPDATING", "ACTIVE", "INACTIVE", "DELETING", "DELETED", "FAILED", "NEEDS_ATTENTION", "IN_PROGRESS", "CANCELING", "CANCELED", "SUCCEEDED", "WAITING"]), 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 WAITING would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.""") +@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["WAITING", "IN_PROGRESS", "FAILED", "SUCCEEDED", "CANCELED"]), 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 WAITING --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 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({}) @@ -9443,7 +9559,7 @@ def reschedule_deployment_upgrade(ctx, from_json, wait_for_state, max_wait_secon @cli_util.option('--deployment-upgrade-id', required=True, help=u"""A unique Deployment Upgrade identifier.""") @cli_util.option('--time-schedule', required=True, type=custom_types.CLI_DATETIME, help=u"""The time of upgrade schedule. The format is defined by [RFC3339], such as `2016-08-25T21:10:29.600Z`.""" + custom_types.CLI_DATETIME.VALID_DATETIME_CLI_HELP_MESSAGE) @cli_util.option('--if-match', help=u"""For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource is updated or deleted only if the etag you provide matches the resource's current etag value.""") -@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["CREATING", "UPDATING", "ACTIVE", "INACTIVE", "DELETING", "DELETED", "FAILED", "NEEDS_ATTENTION", "IN_PROGRESS", "CANCELING", "CANCELED", "SUCCEEDED", "WAITING"]), 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 WAITING would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.""") +@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["WAITING", "IN_PROGRESS", "FAILED", "SUCCEEDED", "CANCELED"]), 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 WAITING --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 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({}) @@ -10804,6 +10920,7 @@ def update_connection_update_elasticsearch_connection_details(ctx, from_json, fo @cli_util.option('--security-attributes', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Security attributes for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags]. Example: `{\"Oracle-ZPR\": {\"MaxEgressCount\": {\"value\": \"42\", \"mode\": \"enforce\"}}}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP) +@cli_util.option('--endpoint-parameterconflict', help=u"""A legal URL to connect to BigQuery including scheme, server name and port (if not the default port). Default: https://bigquery.googleapis.com""") @cli_util.option('--service-account-key-file', help=u"""The base64 encoded content of the service account key file containing the credentials required to use Google BigQuery. Deprecated: This field is deprecated and replaced by \"serviceAccountKeyFileSecretId\". This field will be removed after February 15 2026.""") @cli_util.option('--service-account-key-file-secret-id', help=u"""The [OCID] of the Secret where the content of the service account key file is stored, which contains the credentials required to use Google BigQuery. Note: When provided, 'serviceAccountKeyFile' field must not be provided.""") @cli_util.option('--if-match', help=u"""For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource is updated or deleted only if the etag you provide matches the resource's current etag value.""") @@ -10817,7 +10934,7 @@ def update_connection_update_elasticsearch_connection_details(ctx, from_json, fo @click.pass_context @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'freeform-tags': {'module': 'golden_gate', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'golden_gate', 'class': 'dict(str, dict(str, object))'}, 'nsg-ids': {'module': 'golden_gate', 'class': 'list[string]'}, 'security-attributes': {'module': 'golden_gate', 'class': 'dict(str, dict(str, object))'}}) @cli_util.wrap_exceptions -def update_connection_update_google_big_query_connection_details(ctx, from_json, force, wait_for_state, max_wait_seconds, wait_interval_seconds, connection_id, display_name, description, freeform_tags, defined_tags, vault_id, key_id, nsg_ids, subnet_id, routing_method, does_use_secret_ids, security_attributes, service_account_key_file, service_account_key_file_secret_id, if_match, is_lock_override): +def update_connection_update_google_big_query_connection_details(ctx, from_json, force, wait_for_state, max_wait_seconds, wait_interval_seconds, connection_id, display_name, description, freeform_tags, defined_tags, vault_id, key_id, nsg_ids, subnet_id, routing_method, does_use_secret_ids, security_attributes, endpoint_parameterconflict, service_account_key_file, service_account_key_file_secret_id, if_match, is_lock_override): if isinstance(connection_id, six.string_types) and len(connection_id.strip()) == 0: raise click.UsageError('Parameter --connection-id cannot be whitespace or empty string') @@ -10868,6 +10985,9 @@ def update_connection_update_google_big_query_connection_details(ctx, from_json, if security_attributes is not None: _details['securityAttributes'] = cli_util.parse_json_parameter("security_attributes", security_attributes) + if endpoint_parameterconflict is not None: + _details['endpoint'] = endpoint_parameterconflict + if service_account_key_file is not None: _details['serviceAccountKeyFile'] = service_account_key_file @@ -10938,10 +11058,14 @@ def update_connection_update_google_big_query_connection_details(ctx, from_json, @cli_util.option('--authentication-mode', help=u"""Authentication mode. It can be provided at creation of Oracle Autonomous Database Serverless connections, when a databaseId is provided. The default value is MTLS.""") @cli_util.option('--wallet', help=u"""The wallet contents Oracle GoldenGate uses to make connections to a database. This attribute is expected to be base64 encoded. Deprecated: This field is deprecated and replaced by \"walletSecretId\". This field will be removed after February 15 2026.""") @cli_util.option('--wallet-secret-id', help=u"""The [OCID] of the Secret where the wallet file is stored. The wallet contents Oracle GoldenGate uses to make connections to a database. Note: When provided, 'wallet' field must not be provided.""") -@cli_util.option('--session-mode', help=u"""The mode of the database connection session to be established by the data client. 'REDIRECT' - for a RAC database, 'DIRECT' - for a non-RAC database. Connection to a RAC database involves a redirection received from the SCAN listeners to the database node to connect to. By default the mode would be DIRECT.""") -@cli_util.option('--private-ip', help=u"""Deprecated: this field will be removed in future versions. Either specify the private IP in the connectionString or host field, or make sure the host name is resolvable in the target VCN. +@cli_util.option('--session-mode', help=u"""Specifies the session mode for the database connection. Use REDIRECT only for RAC databases with SCAN listeners that return IP addresses. For RAC databases with SCAN listeners that return FQDNs, and for all other Oracle database technologies, use DIRECT. In RAC deployments, SCAN listeners redirects a connection to a specific database node, identified by either IP address or FQDN. It is recommended to configure RAC with FQDN-based SCAN listeners. + +The default is DIRECT, except when databaseId is provided and the discovered database relies on the SCAN listener. In this case, the default is REDIRECT. -The private IP address of the connection's endpoint in the customer's VCN, typically a database endpoint or a big data endpoint (e.g. Kafka bootstrap server). In case the privateIp is provided, the subnetId must also be provided. In case the privateIp (and the subnetId) is not provided it is assumed the datasource is publicly accessible. In case the connection is accessible only privately, the lack of privateIp will result in not being able to access the connection.""") +Deprecated: Defaulting to the REDIRECT session mode will be removed after March 1, 2027.""") +@cli_util.option('--private-ip', help=u"""This property is not available when creating connections. For existing deprecated connections having this value set, the value cannot be updated; set it to empty. + +For deprecated connections created with this field in the past, either the private IP had to be specified in the connectionString or host field, or the host name had to be resolvable in the target VCN.""") @cli_util.option('--database-id', help=u"""The [OCID] of the database being referenced.""") @cli_util.option('--if-match', help=u"""For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource is updated or deleted only if the etag you provide matches the resource's current etag value.""") @cli_util.option('--is-lock-override', type=click.BOOL, help=u"""Whether to override locks (if any exist).""") @@ -11724,6 +11848,7 @@ def update_connection_update_mongo_db_connection_details(ctx, from_json, force, @cli_util.option('--security-attributes', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Security attributes for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags]. Example: `{\"Oracle-ZPR\": {\"MaxEgressCount\": {\"value\": \"42\", \"mode\": \"enforce\"}}}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP) +@cli_util.option('--endpoint-parameterconflict', help=u"""A legal URL to connect to Google Cloud Storage including scheme, server name and port (if not the default port). Default: https://storage.googleapis.com""") @cli_util.option('--service-account-key-file', help=u"""The base64 encoded content of the service account key file containing the credentials required to use Google Cloud Storage. Deprecated: This field is deprecated and replaced by \"serviceAccountKeyFileSecretId\". This field will be removed after February 15 2026.""") @cli_util.option('--service-account-key-file-secret-id', help=u"""The [OCID] of the Secret where the content of the service account key file is stored, which contains the credentials required to use Google Cloud Storage. Note: When provided, 'serviceAccountKeyFile' field must not be provided.""") @cli_util.option('--if-match', help=u"""For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource is updated or deleted only if the etag you provide matches the resource's current etag value.""") @@ -11737,7 +11862,7 @@ def update_connection_update_mongo_db_connection_details(ctx, from_json, force, @click.pass_context @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'freeform-tags': {'module': 'golden_gate', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'golden_gate', 'class': 'dict(str, dict(str, object))'}, 'nsg-ids': {'module': 'golden_gate', 'class': 'list[string]'}, 'security-attributes': {'module': 'golden_gate', 'class': 'dict(str, dict(str, object))'}}) @cli_util.wrap_exceptions -def update_connection_update_google_cloud_storage_connection_details(ctx, from_json, force, wait_for_state, max_wait_seconds, wait_interval_seconds, connection_id, display_name, description, freeform_tags, defined_tags, vault_id, key_id, nsg_ids, subnet_id, routing_method, does_use_secret_ids, security_attributes, service_account_key_file, service_account_key_file_secret_id, if_match, is_lock_override): +def update_connection_update_google_cloud_storage_connection_details(ctx, from_json, force, wait_for_state, max_wait_seconds, wait_interval_seconds, connection_id, display_name, description, freeform_tags, defined_tags, vault_id, key_id, nsg_ids, subnet_id, routing_method, does_use_secret_ids, security_attributes, endpoint_parameterconflict, service_account_key_file, service_account_key_file_secret_id, if_match, is_lock_override): if isinstance(connection_id, six.string_types) and len(connection_id.strip()) == 0: raise click.UsageError('Parameter --connection-id cannot be whitespace or empty string') @@ -11788,6 +11913,9 @@ def update_connection_update_google_cloud_storage_connection_details(ctx, from_j if security_attributes is not None: _details['securityAttributes'] = cli_util.parse_json_parameter("security_attributes", security_attributes) + if endpoint_parameterconflict is not None: + _details['endpoint'] = endpoint_parameterconflict + if service_account_key_file is not None: _details['serviceAccountKeyFile'] = service_account_key_file @@ -11857,6 +11985,8 @@ def update_connection_update_google_cloud_storage_connection_details(ctx, from_j @cli_util.option('--user-id', help=u"""The [OCID] of the OCI user who will access the Object Storage. The user must have write access to the bucket they want to connect to. If the user is not provided, backend will default to the user who is calling the API endpoint.""") @cli_util.option('--private-key-file-secret-id', help=u"""The [OCID] of the Secret that stores the content of the private key file (PEM file) corresponding to the API key of the fingerprint. See documentation: https://docs.oracle.com/en-us/iaas/Content/Identity/Tasks/managingcredentials.htm Note: When provided, 'privateKeyFile' field must not be provided.""") @cli_util.option('--private-key-passphrase-secret-id', help=u"""The [OCID] of the Secret that stores the passphrase of the private key. Note: When provided, 'privateKeyPassphrase' field must not be provided.""") +@cli_util.option('--private-key-file', help=u"""The base64 encoded content of the private key file (PEM file) corresponding to the API key of the fingerprint. See documentation: https://docs.oracle.com/en-us/iaas/Content/Identity/Tasks/managingcredentials.htm Deprecated: This field is deprecated and replaced by \"privateKeyFileSecretId\". This field will be removed after February 15 2026.""") +@cli_util.option('--private-key-passphrase', help=u"""The passphrase of the private key. Deprecated: This field is deprecated and replaced by \"privateKeyPassphraseSecretId\". This field will be removed after February 15 2026.""") @cli_util.option('--public-key-fingerprint', help=u"""The fingerprint of the API Key of the user specified by the userId. See documentation: https://docs.oracle.com/en-us/iaas/Content/Identity/Tasks/managingcredentials.htm""") @cli_util.option('--should-use-resource-principal', type=click.BOOL, help=u"""Specifies that the user intends to authenticate to the instance using a resource principal. Default: false""") @cli_util.option('--if-match', help=u"""For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource is updated or deleted only if the etag you provide matches the resource's current etag value.""") @@ -11870,7 +12000,7 @@ def update_connection_update_google_cloud_storage_connection_details(ctx, from_j @click.pass_context @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'freeform-tags': {'module': 'golden_gate', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'golden_gate', 'class': 'dict(str, dict(str, object))'}, 'nsg-ids': {'module': 'golden_gate', 'class': 'list[string]'}, 'security-attributes': {'module': 'golden_gate', 'class': 'dict(str, dict(str, object))'}}) @cli_util.wrap_exceptions -def update_connection_update_oracle_ai_data_platform_connection_details(ctx, from_json, force, wait_for_state, max_wait_seconds, wait_interval_seconds, connection_id, display_name, description, freeform_tags, defined_tags, vault_id, key_id, nsg_ids, subnet_id, routing_method, does_use_secret_ids, security_attributes, connection_url, tenancy_id, region_parameterconflict, user_id, private_key_file_secret_id, private_key_passphrase_secret_id, public_key_fingerprint, should_use_resource_principal, if_match, is_lock_override): +def update_connection_update_oracle_ai_data_platform_connection_details(ctx, from_json, force, wait_for_state, max_wait_seconds, wait_interval_seconds, connection_id, display_name, description, freeform_tags, defined_tags, vault_id, key_id, nsg_ids, subnet_id, routing_method, does_use_secret_ids, security_attributes, connection_url, tenancy_id, region_parameterconflict, user_id, private_key_file_secret_id, private_key_passphrase_secret_id, private_key_file, private_key_passphrase, public_key_fingerprint, should_use_resource_principal, if_match, is_lock_override): if isinstance(connection_id, six.string_types) and len(connection_id.strip()) == 0: raise click.UsageError('Parameter --connection-id cannot be whitespace or empty string') @@ -11939,6 +12069,12 @@ def update_connection_update_oracle_ai_data_platform_connection_details(ctx, fro if private_key_passphrase_secret_id is not None: _details['privateKeyPassphraseSecretId'] = private_key_passphrase_secret_id + if private_key_file is not None: + _details['privateKeyFile'] = private_key_file + + if private_key_passphrase is not None: + _details['privateKeyPassphrase'] = private_key_passphrase + if public_key_fingerprint is not None: _details['publicKeyFingerprint'] = public_key_fingerprint @@ -12157,9 +12293,9 @@ def update_connection_update_microsoft_fabric_connection_details(ctx, from_json, @cli_util.option('--ssl-cert', help=u"""The base64 encoded certificate of the PostgreSQL server. The supported file formats are .pem and .crt. It is not included in GET responses if the `view=COMPACT` query parameter is specified.""") @cli_util.option('--ssl-key', help=u"""The base64 encoded private key of the PostgreSQL server. The supported file formats are .pem and .crt. Deprecated: This field is deprecated and replaced by \"sslKeySecretId\". This field will be removed after February 15 2026.""") @cli_util.option('--ssl-key-secret-id', help=u"""The [OCID] of the Secret that stores the private key of the PostgreSQL server. The supported file formats are .pem and .crt. Note: When provided, 'sslKey' field must not be provided.""") -@cli_util.option('--private-ip', help=u"""Deprecated: this field will be removed in future versions. Either specify the private IP in the connectionString or host field, or make sure the host name is resolvable in the target VCN. +@cli_util.option('--private-ip', help=u"""This property is not available when creating connections. For existing deprecated connections having this value set, the value cannot be updated; set it to empty. -The private IP address of the connection's endpoint in the customer's VCN, typically a database endpoint or a big data endpoint (e.g. Kafka bootstrap server). In case the privateIp is provided, the subnetId must also be provided. In case the privateIp (and the subnetId) is not provided it is assumed the datasource is publicly accessible. In case the connection is accessible only privately, the lack of privateIp will result in not being able to access the connection.""") +For deprecated connections created with this field in the past, either the private IP had to be specified in the connectionString or host field, or the host name had to be resolvable in the target VCN.""") @cli_util.option('--db-system-id', help=u"""The [OCID] of the database system being referenced.""") @cli_util.option('--if-match', help=u"""For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource is updated or deleted only if the etag you provide matches the resource's current etag value.""") @cli_util.option('--is-lock-override', type=click.BOOL, help=u"""Whether to override locks (if any exist).""") @@ -12340,9 +12476,9 @@ def update_connection_update_postgresql_connection_details(ctx, from_json, force @cli_util.option('--security-protocol', help=u"""Security Type for Microsoft SQL Server.""") @cli_util.option('--ssl-ca', help=u"""Database Certificate - The base64 encoded content of a .pem or .crt file containing the server public key (for 1-way SSL).""") @cli_util.option('--should-validate-server-certificate', type=click.BOOL, help=u"""If set to true, the driver validates the certificate that is sent by the database server.""") -@cli_util.option('--private-ip', help=u"""Deprecated: this field will be removed in future versions. Either specify the private IP in the connectionString or host field, or make sure the host name is resolvable in the target VCN. +@cli_util.option('--private-ip', help=u"""This property is not available when creating connections. For existing deprecated connections having this value set, the value cannot be updated; set it to empty. -The private IP address of the connection's endpoint in the customer's VCN, typically a database endpoint or a big data endpoint (e.g. Kafka bootstrap server). In case the privateIp is provided, the subnetId must also be provided. In case the privateIp (and the subnetId) is not provided it is assumed the datasource is publicly accessible. In case the connection is accessible only privately, the lack of privateIp will result in not being able to access the connection.""") +For deprecated connections created with this field in the past, either the private IP had to be specified in the connectionString or host field, or the host name had to be resolvable in the target VCN.""") @cli_util.option('--if-match', help=u"""For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource is updated or deleted only if the etag you provide matches the resource's current etag value.""") @cli_util.option('--is-lock-override', type=click.BOOL, help=u"""Whether to override locks (if any exist).""") @cli_util.option('--force', help="""Perform update without prompting for confirmation.""", is_flag=True) @@ -13455,9 +13591,9 @@ def update_connection_update_amazon_kinesis_connection_details(ctx, from_json, f @cli_util.option('--key-store-password-secret-id', help=u"""The [OCID] of the Secret where the KeyStore password is stored. Note: When provided, 'keyStorePassword' field must not be provided.""") @cli_util.option('--ssl-key-password', help=u"""The password for the cert inside of the KeyStore. In case it differs from the KeyStore password, it should be provided. Deprecated: This field is deprecated and replaced by \"sslKeyPasswordSecretId\". This field will be removed after February 15 2026.""") @cli_util.option('--ssl-key-password-secret-id', help=u"""The [OCID] of the Secret where the password is stored for the cert inside of the Keystore. In case it differs from the KeyStore password, it should be provided. Note: When provided, 'sslKeyPassword' field must not be provided.""") -@cli_util.option('--private-ip', help=u"""Deprecated: this field will be removed in future versions. Either specify the private IP in the connectionString or host field, or make sure the host name is resolvable in the target VCN. +@cli_util.option('--private-ip', help=u"""This property is not available when creating connections. For existing deprecated connections having this value set, the value cannot be updated; set it to empty. -The private IP address of the connection's endpoint in the customer's VCN, typically a database endpoint or a big data endpoint (e.g. Kafka bootstrap server). In case the privateIp is provided, the subnetId must also be provided. In case the privateIp (and the subnetId) is not provided it is assumed the datasource is publicly accessible. In case the connection is accessible only privately, the lack of privateIp will result in not being able to access the connection.""") +For deprecated connections created with this field in the past, either the private IP had to be specified in the connectionString or host field, or the host name had to be resolvable in the target VCN.""") @cli_util.option('--if-match', help=u"""For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource is updated or deleted only if the etag you provide matches the resource's current etag value.""") @cli_util.option('--is-lock-override', type=click.BOOL, help=u"""Whether to override locks (if any exist).""") @cli_util.option('--force', help="""Perform update without prompting for confirmation.""", is_flag=True) @@ -13658,9 +13794,9 @@ def update_connection_update_java_message_service_connection_details(ctx, from_j @cli_util.option('--username', help=u"""The username credential existing in the Oracle GoldenGate used to be connected to.""") @cli_util.option('--password', help=u"""The password used to connect to the Oracle GoldenGate accessed trough this connection. Deprecated: This field is deprecated and replaced by \"passwordSecretId\". This field will be removed after February 15 2026.""") @cli_util.option('--password-secret-id', help=u"""The [OCID] of the Secret where the password is stored, which is used to connect to the Oracle GoldenGate accessed trough this connection. Note: When provided, 'password' field must not be provided.""") -@cli_util.option('--private-ip', help=u"""Deprecated: this field will be removed in future versions. Either specify the private IP in the connectionString or host field, or make sure the host name is resolvable in the target VCN. +@cli_util.option('--private-ip', help=u"""This property is not available when creating connections. For existing deprecated connections having this value set, the value cannot be updated; set it to empty. -The private IP address of the connection's endpoint in the customer's VCN, typically a database endpoint or a big data endpoint (e.g. Kafka bootstrap server). In case the privateIp is provided, the subnetId must also be provided. In case the privateIp (and the subnetId) is not provided it is assumed the datasource is publicly accessible. In case the connection is accessible only privately, the lack of privateIp will result in not being able to access the connection.""") +For deprecated connections created with this field in the past, either the private IP had to be specified in the connectionString or host field, or the host name had to be resolvable in the target VCN.""") @cli_util.option('--if-match', help=u"""For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource is updated or deleted only if the etag you provide matches the resource's current etag value.""") @cli_util.option('--is-lock-override', type=click.BOOL, help=u"""Whether to override locks (if any exist).""") @cli_util.option('--force', help="""Perform update without prompting for confirmation.""", is_flag=True) @@ -14098,9 +14234,9 @@ def update_connection_update_oracle_nosql_connection_details(ctx, from_json, for @cli_util.option('--key-store-password-secret-id', help=u"""The [OCID] of the Secret where the kafka Ssl KeyStore password is stored. Note: When provided, 'keyStorePassword' field must not be provided.""") @cli_util.option('--ssl-key-password', help=u"""The password for the cert inside the KeyStore. In case it differs from the KeyStore password, it should be provided. Deprecated: This field is deprecated and replaced by \"sslKeyPasswordSecretId\". This field will be removed after February 15 2026.""") @cli_util.option('--ssl-key-password-secret-id', help=u"""The [OCID] of the Secret that stores the password for the cert inside the KeyStore. In case it differs from the KeyStore password, it should be provided. Note: When provided, 'sslKeyPassword' field must not be provided.""") -@cli_util.option('--private-ip', help=u"""Deprecated: this field will be removed in future versions. Either specify the private IP in the connectionString or host field, or make sure the host name is resolvable in the target VCN. +@cli_util.option('--private-ip', help=u"""This property is not available when creating connections. For existing deprecated connections having this value set, the value cannot be updated; set it to empty. -The private IP address of the connection's endpoint in the customer's VCN, typically a database endpoint or a big data endpoint (e.g. Kafka bootstrap server). In case the privateIp is provided, the subnetId must also be provided. In case the privateIp (and the subnetId) is not provided it is assumed the datasource is publicly accessible. In case the connection is accessible only privately, the lack of privateIp will result in not being able to access the connection.""") +For deprecated connections created with this field in the past, either the private IP had to be specified in the connectionString or host field, or the host name had to be resolvable in the target VCN.""") @cli_util.option('--if-match', help=u"""For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource is updated or deleted only if the etag you provide matches the resource's current etag value.""") @cli_util.option('--is-lock-override', type=click.BOOL, help=u"""Whether to override locks (if any exist).""") @cli_util.option('--force', help="""Perform update without prompting for confirmation.""", is_flag=True) @@ -14420,9 +14556,9 @@ def update_connection_update_amazon_s3_connection_details(ctx, from_json, force, @cli_util.option('--ssl-cert', help=u"""Client Certificate - The base64 encoded content of a .pem or .crt file containing the client public key (for 2-way SSL). It is not included in GET responses if the `view=COMPACT` query parameter is specified.""") @cli_util.option('--ssl-key', help=u"""Client Key - The base64 encoded content of a .pem or .crt file containing the client private key (for 2-way SSL). Deprecated: This field is deprecated and replaced by \"sslKeySecretId\". This field will be removed after February 15 2026.""") @cli_util.option('--ssl-key-secret-id', help=u"""The [OCID] of the Secret that stores the Client Key - The content of a .pem or .crt file containing the client private key (for 2-way SSL). Note: When provided, 'sslKey' field must not be provided.""") -@cli_util.option('--private-ip', help=u"""Deprecated: this field will be removed in future versions. Either specify the private IP in the connectionString or host field, or make sure the host name is resolvable in the target VCN. +@cli_util.option('--private-ip', help=u"""This property is not available when creating connections. For existing deprecated connections having this value set, the value cannot be updated; set it to empty. -The private IP address of the connection's endpoint in the customer's VCN, typically a database endpoint or a big data endpoint (e.g. Kafka bootstrap server). In case the privateIp is provided, the subnetId must also be provided. In case the privateIp (and the subnetId) is not provided it is assumed the datasource is publicly accessible. In case the connection is accessible only privately, the lack of privateIp will result in not being able to access the connection.""") +For deprecated connections created with this field in the past, either the private IP had to be specified in the connectionString or host field, or the host name had to be resolvable in the target VCN.""") @cli_util.option('--additional-attributes', type=custom_types.CLI_COMPLEX_TYPE, help=u"""An array of name-value pair attribute entries. Used as additional parameters in connection string. This option is a JSON list with items of type NameValuePair. For documentation on NameValuePair please see our API reference: https://docs.oracle.com/en-us/iaas/api/#/en/goldengate/20200407/datatypes/NameValuePair.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP) @@ -15271,7 +15407,11 @@ def update_database_registration(ctx, from_json, force, wait_for_state, max_wait Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP) @cli_util.option('--nsg-ids', type=custom_types.CLI_COMPLEX_TYPE, help=u"""An array of Network Security Group OCIDs used to define network access for either Deployments or Connections.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP) @cli_util.option('--subnet-id', help=u"""The [OCID] of the subnet of the deployment's private endpoint. The subnet must be a private subnet. For backward compatibility, public subnets are allowed until May 31 2025, after which the private subnet will be enforced.""") -@cli_util.option('--load-balancer-subnet-id', help=u"""The [OCID] of a public subnet in the customer tenancy. Can be provided only for public deployments. If provided, the loadbalancer will be created in this subnet instead of the service tenancy. For backward compatibility, this is an optional property. It will become mandatory for public deployments after October 1, 2024.""") +@cli_util.option('--load-balancer-subnet-id', help=u"""The [OCID] of a public subnet in the customer tenancy used to host the public load balancer of the deployment. + +Rules: - Create: Mandatory when isPublic is true. Must be a public, regional subnet in the same VCN as subnetId. - Update: - For public deployments, this property must be present and is immutable once set (cannot be changed to a different subnet). - Legacy exception: a public deployment created without this property may continue to be updated without providing it; once set, it becomes immutable. + +Validation: - Must reference a public subnet. - Must be a regional subnet. - Must be in the same VCN as subnetId.""") @cli_util.option('--is-public', type=click.BOOL, help=u"""True if this object is publicly available.""") @cli_util.option('--fqdn', help=u"""A three-label Fully Qualified Domain Name (FQDN) for a resource.""") @cli_util.option('--cpu-core-count', type=click.INT, help=u"""The Minimum number of OCPUs to be made available for this Deployment.""") @@ -15425,7 +15565,7 @@ def update_deployment(ctx, from_json, force, wait_for_state, max_wait_seconds, w @cli_util.option('--if-match', help=u"""For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource is updated or deleted only if the etag you provide matches the resource's current etag value.""") @cli_util.option('--is-lock-override', type=click.BOOL, help=u"""Whether to override locks (if any exist).""") @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", "UPDATING", "ACTIVE", "INACTIVE", "DELETING", "DELETED", "FAILED", "NEEDS_ATTENTION", "IN_PROGRESS", "CANCELING", "CANCELED", "SUCCEEDED", "WAITING"]), 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 WAITING would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.""") +@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["CREATING", "ACTIVE", "DELETING", "DELETED", "FAILED", "CANCELING", "CANCELED"]), 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 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 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({'freeform-tags': {'module': 'golden_gate', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'golden_gate', 'class': 'dict(str, dict(str, object))'}}) diff --git a/services/golden_gate/tests/util/generated/command_to_api.py b/services/golden_gate/tests/util/generated/command_to_api.py index 65d08c8f..cc9cb719 100644 --- a/services/golden_gate/tests/util/generated/command_to_api.py +++ b/services/golden_gate/tests/util/generated/command_to_api.py @@ -70,6 +70,7 @@ "goldengate.list_work_request_errors": "oci.golden_gate.GoldenGateClient.list_work_request_errors", "goldengate.list_work_request_logs": "oci.golden_gate.GoldenGateClient.list_work_request_logs", "goldengate.list_work_requests": "oci.golden_gate.GoldenGateClient.list_work_requests", + "goldengate.migrate_connection": "oci.golden_gate.GoldenGateClient.migrate_connection", "goldengate.pause_pipeline": "oci.golden_gate.GoldenGateClient.pause_pipeline", "goldengate.refresh_connection": "oci.golden_gate.GoldenGateClient.refresh_connection", "goldengate.remove_connection_lock": "oci.golden_gate.GoldenGateClient.remove_connection_lock", diff --git a/services/logging/src/oci_cli_logging_management/generated/loggingmanagement_cli.py b/services/logging/src/oci_cli_logging_management/generated/loggingmanagement_cli.py index dd2e3414..cbd0345e 100644 --- a/services/logging/src/oci_cli_logging_management/generated/loggingmanagement_cli.py +++ b/services/logging/src/oci_cli_logging_management/generated/loggingmanagement_cli.py @@ -1178,7 +1178,7 @@ def get_work_request(ctx, from_json, work_request_id): @cli_util.option('--is-compartment-id-in-subtree', type=click.BOOL, help=u"""Specifies whether or not nested compartments should be traversed. Defaults to false.""") @cli_util.option('--display-name', help=u"""Resource name.""") @cli_util.option('--page', help=u"""For list pagination. The value of the `opc-next-page` or `opc-previous-page` response header from the previous \"List\" call. For important details about how pagination works, see [List Pagination].""") -@cli_util.option('--limit', type=click.INT, help=u"""The maximum number of items to return in a paginated \"List\" call.""") +@cli_util.option('--limit', type=click.INT, help=u"""When setting the page limit, specifies the maximum number of unfiltered records that can be fetched from the data store in one request. Filtering happens after the records are retrieved. Subsequent pages might include results that match the query criteria.""") @cli_util.option('--sort-by', type=custom_types.CliCaseInsensitiveChoice(["timeCreated", "displayName"]), help=u"""The field to sort by (one column only). Default sort order is ascending exception of `timeCreated` and `timeLastModified` columns (descending).""") @cli_util.option('--sort-order', type=custom_types.CliCaseInsensitiveChoice(["ASC", "DESC"]), help=u"""The sort order to use, whether 'asc' or 'desc'.""") @cli_util.option('--all', 'all_pages', is_flag=True, help="""Fetches all pages of results. If you provide this option, then you cannot provide the --limit option.""") @@ -1238,7 +1238,7 @@ def list_log_groups(ctx, from_json, all_pages, page_size, compartment_id, is_com @cli_util.option('--log-saved-search-id', help=u"""OCID of the LogSavedSearch.""") @cli_util.option('--name', help=u"""Resource name.""") @cli_util.option('--page', help=u"""For list pagination. The value of the `opc-next-page` or `opc-previous-page` response header from the previous \"List\" call. For important details about how pagination works, see [List Pagination].""") -@cli_util.option('--limit', type=click.INT, help=u"""The maximum number of items to return in a paginated \"List\" call.""") +@cli_util.option('--limit', type=click.INT, help=u"""When setting the page limit, specifies the maximum number of unfiltered records that can be fetched from the data store in one request. Filtering happens after the records are retrieved. Subsequent pages might include results that match the query criteria.""") @cli_util.option('--sort-by', type=custom_types.CliCaseInsensitiveChoice(["timeCreated", "displayName"]), help=u"""The field to sort by (one column only). Default sort order is ascending exception of `timeCreated` and `timeLastModified` columns (descending).""") @cli_util.option('--sort-order', type=custom_types.CliCaseInsensitiveChoice(["ASC", "DESC"]), help=u"""The sort order to use, whether 'asc' or 'desc'.""") @cli_util.option('--all', 'all_pages', is_flag=True, help="""Fetches all pages of results. If you provide this option, then you cannot provide the --limit option.""") @@ -1301,7 +1301,7 @@ def list_log_saved_searches(ctx, from_json, all_pages, page_size, compartment_id @cli_util.option('--display-name', help=u"""Resource name.""") @cli_util.option('--lifecycle-state', type=custom_types.CliCaseInsensitiveChoice(["CREATING", "ACTIVE", "UPDATING", "INACTIVE", "DELETING", "FAILED"]), help=u"""Lifecycle state of the log object""") @cli_util.option('--page', help=u"""For list pagination. The value of the `opc-next-page` or `opc-previous-page` response header from the previous \"List\" call. For important details about how pagination works, see [List Pagination].""") -@cli_util.option('--limit', type=click.INT, help=u"""The maximum number of items to return in a paginated \"List\" call.""") +@cli_util.option('--limit', type=click.INT, help=u"""When setting the page limit, specifies the maximum number of unfiltered records that can be fetched from the data store in one request. Filtering happens after the records are retrieved. Subsequent pages might include results that match the query criteria.""") @cli_util.option('--sort-by', type=custom_types.CliCaseInsensitiveChoice(["timeCreated", "displayName"]), help=u"""The field to sort by (one column only). Default sort order is ascending exception of `timeCreated` and `timeLastModified` columns (descending).""") @cli_util.option('--sort-order', type=custom_types.CliCaseInsensitiveChoice(["ASC", "DESC"]), help=u"""The sort order to use, whether 'asc' or 'desc'.""") @cli_util.option('--all', 'all_pages', is_flag=True, help="""Fetches all pages of results. If you provide this option, then you cannot provide the --limit option.""") @@ -1366,15 +1366,18 @@ def list_logs(ctx, from_json, all_pages, page_size, log_group_id, log_type, sour @service_group.command(name=cli_util.override('logging.list_services.command_name', 'list'), help=u"""Lists all services that support logging. \n[Command Reference](listServices)""") +@cli_util.option('--compartment-id', help=u"""Compartment OCID to list resources in. Please see compartmentIdInSubtree for nested compartments traversal.""") @cli_util.option('--all', 'all_pages', is_flag=True, help="""Fetches all pages of results.""") @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': 'logging', 'class': 'list[ServiceSummary]'}) @cli_util.wrap_exceptions -def list_services(ctx, from_json, all_pages, ): +def list_services(ctx, from_json, all_pages, compartment_id): kwargs = {} + if compartment_id is not None: + kwargs['compartment_id'] = compartment_id kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id']) client = cli_util.build_client('logging', 'logging_management', ctx) result = client.list_services( @@ -1390,7 +1393,7 @@ def list_services(ctx, from_json, all_pages, ): @cli_util.option('--group-id', help=u"""The OCID of a group or a dynamic group.""") @cli_util.option('--display-name', help=u"""Resource name.""") @cli_util.option('--lifecycle-state', type=custom_types.CliCaseInsensitiveChoice(["CREATING", "ACTIVE", "UPDATING", "INACTIVE", "DELETING", "FAILED"]), help=u"""Lifecycle state of the log object""") -@cli_util.option('--limit', type=click.INT, help=u"""The maximum number of items to return in a paginated \"List\" call.""") +@cli_util.option('--limit', type=click.INT, help=u"""When setting the page limit, specifies the maximum number of unfiltered records that can be fetched from the data store in one request. Filtering happens after the records are retrieved. Subsequent pages might include results that match the query criteria.""") @cli_util.option('--page', help=u"""For list pagination. The value of the `opc-next-page` or `opc-previous-page` response header from the previous \"List\" call. For important details about how pagination works, see [List Pagination].""") @cli_util.option('--sort-by', type=custom_types.CliCaseInsensitiveChoice(["timeCreated", "displayName"]), help=u"""The field to sort by (one column only). Default sort order is ascending exception of `timeCreated` and `timeLastModified` columns (descending).""") @cli_util.option('--sort-order', type=custom_types.CliCaseInsensitiveChoice(["ASC", "DESC"]), help=u"""The sort order to use, whether 'asc' or 'desc'.""") @@ -1455,7 +1458,7 @@ def list_unified_agent_configurations(ctx, from_json, all_pages, page_size, comp @work_request_error_group.command(name=cli_util.override('logging.list_work_request_errors.command_name', 'list'), help=u"""Return a list of errors for a given work request. \n[Command Reference](listWorkRequestErrors)""") @cli_util.option('--work-request-id', required=True, help=u"""The asynchronous request ID.""") @cli_util.option('--page', help=u"""For list pagination. The value of the `opc-next-page` or `opc-previous-page` response header from the previous \"List\" call. For important details about how pagination works, see [List Pagination].""") -@cli_util.option('--limit', type=click.INT, help=u"""The maximum number of items to return in a paginated \"List\" call.""") +@cli_util.option('--limit', type=click.INT, help=u"""When setting the page limit, specifies the maximum number of unfiltered records that can be fetched from the data store in one request. Filtering happens after the records are retrieved. Subsequent pages might include results that match the query criteria.""") @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({}) @@ -1506,7 +1509,7 @@ def list_work_request_errors(ctx, from_json, all_pages, page_size, work_request_ @work_request_log_group.command(name=cli_util.override('logging.list_work_request_logs.command_name', 'list'), help=u"""Return a list of logs for a given work request. \n[Command Reference](listWorkRequestLogs)""") @cli_util.option('--work-request-id', required=True, help=u"""The asynchronous request ID.""") @cli_util.option('--page', help=u"""For list pagination. The value of the `opc-next-page` or `opc-previous-page` response header from the previous \"List\" call. For important details about how pagination works, see [List Pagination].""") -@cli_util.option('--limit', type=click.INT, help=u"""The maximum number of items to return in a paginated \"List\" call.""") +@cli_util.option('--limit', type=click.INT, help=u"""When setting the page limit, specifies the maximum number of unfiltered records that can be fetched from the data store in one request. Filtering happens after the records are retrieved. Subsequent pages might include results that match the query criteria.""") @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({}) @@ -1559,7 +1562,7 @@ def list_work_request_logs(ctx, from_json, all_pages, page_size, work_request_id @cli_util.option('--status', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "CANCELLING", "CANCELED"]), help=u"""Filter results by work request status.""") @cli_util.option('--id', help=u"""Filter results by [OCID]. Must be an OCID of the correct type for the resource type.""") @cli_util.option('--page', help=u"""For list pagination. The value of the `opc-next-page` or `opc-previous-page` response header from the previous \"List\" call. For important details about how pagination works, see [List Pagination].""") -@cli_util.option('--limit', type=click.INT, help=u"""The maximum number of items to return in a paginated \"List\" call.""") +@cli_util.option('--limit', type=click.INT, help=u"""When setting the page limit, specifies the maximum number of unfiltered records that can be fetched from the data store in one request. Filtering happens after the records are retrieved. Subsequent pages might include results that match the query criteria.""") @cli_util.option('--sort-order', type=custom_types.CliCaseInsensitiveChoice(["ASC", "DESC"]), help=u"""The sort order to use, whether 'asc' or 'desc'.""") @cli_util.option('--sort-by', type=custom_types.CliCaseInsensitiveChoice(["operationType", "status", "timeAccepted"]), help=u"""Specifies the field to sort by. Accepts only one field. By default, when you sort by time fields, results are shown in descending order. All other fields default to ascending order.""") @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.""") diff --git a/services/loggingingestion/src/oci_cli_logging/generated/logging_cli.py b/services/loggingingestion/src/oci_cli_logging/generated/logging_cli.py index c8bdf448..8349a942 100644 --- a/services/loggingingestion/src/oci_cli_logging/generated/logging_cli.py +++ b/services/loggingingestion/src/oci_cli_logging/generated/logging_cli.py @@ -16,13 +16,13 @@ from oci_cli.aliasing import CommandGroupWithAlias -@cli.command(cli_util.override('logging_ingestion.logging_ingestion_root_group.command_name', 'logging-ingestion'), cls=CommandGroupWithAlias, help=cli_util.override('logging_ingestion.logging_ingestion_root_group.help', """Use the Logging Ingestion API to ingest your application logs."""), short_help=cli_util.override('logging_ingestion.logging_ingestion_root_group.short_help', """Logging Ingestion API""")) +@cli.command(cli_util.override('logging_ingestion.logging_ingestion_root_group.command_name', 'logging-ingestion'), cls=CommandGroupWithAlias, help=cli_util.override('logging_ingestion.logging_ingestion_root_group.help', """Use the Logging Ingestion API to ingest your application logs. For more information, see [Logging Overview]."""), short_help=cli_util.override('logging_ingestion.logging_ingestion_root_group.short_help', """Logging Ingestion API""")) @cli_util.help_option_group def logging_ingestion_root_group(): pass -@click.command(cli_util.override('logging_ingestion.log_entry_group.command_name', 'log-entry'), cls=CommandGroupWithAlias, help="""Contains the log content with the associated timestamp and ID. Each entry should be less than 1 MB size.""") +@click.command(cli_util.override('logging_ingestion.log_entry_group.command_name', 'log-entry'), cls=CommandGroupWithAlias, help="""Contains the log content with the associated timestamp and ID. Each entry should be less than 1 MB size. Any log data field cannot be more than 10,000 characters. If your data exceeds this limit, the field is truncated during ingestion.""") @cli_util.help_option_group def log_entry_group(): pass diff --git a/services/loggingsearch/src/oci_cli_log_search/generated/logsearch_cli.py b/services/loggingsearch/src/oci_cli_log_search/generated/logsearch_cli.py index 0890964e..facd9efb 100644 --- a/services/loggingsearch/src/oci_cli_log_search/generated/logsearch_cli.py +++ b/services/loggingsearch/src/oci_cli_log_search/generated/logsearch_cli.py @@ -16,7 +16,7 @@ from oci_cli.aliasing import CommandGroupWithAlias -@cli.command(cli_util.override('logging_search.logging_search_root_group.command_name', 'logging-search'), cls=CommandGroupWithAlias, help=cli_util.override('logging_search.logging_search_root_group.help', """Search for logs in your compartments, log groups, and log objects."""), short_help=cli_util.override('logging_search.logging_search_root_group.short_help', """Logging Search API""")) +@cli.command(cli_util.override('logging_search.logging_search_root_group.command_name', 'logging-search'), cls=CommandGroupWithAlias, help=cli_util.override('logging_search.logging_search_root_group.help', """Use the Logging Search API to search for logs in your compartments, log groups, and log objects. For more information, see [Logging Overview]."""), short_help=cli_util.override('logging_search.logging_search_root_group.short_help', """Logging Search API""")) @cli_util.help_option_group def logging_search_root_group(): pass @@ -34,12 +34,12 @@ def search_result_group(): @search_result_group.command(name=cli_util.override('logging_search.search_logs.command_name', 'search-logs'), help=u"""Submit a query to search logs. See [Using the API] for SDK examples. \n[Command Reference](searchLogs)""") -@cli_util.option('--time-start', required=True, type=custom_types.CLI_DATETIME, help=u"""Start filter log's date and time, in the format defined by RFC3339.""" + custom_types.CLI_DATETIME.VALID_DATETIME_CLI_HELP_MESSAGE) -@cli_util.option('--time-end', required=True, type=custom_types.CLI_DATETIME, help=u"""End filter log's date and time, in the format defined by RFC3339.""" + custom_types.CLI_DATETIME.VALID_DATETIME_CLI_HELP_MESSAGE) +@cli_util.option('--time-start', required=True, type=custom_types.CLI_DATETIME, help=u"""Start filter log's date and time, in the format defined by RFC 3339.""" + custom_types.CLI_DATETIME.VALID_DATETIME_CLI_HELP_MESSAGE) +@cli_util.option('--time-end', required=True, type=custom_types.CLI_DATETIME, help=u"""End filter log's date and time, in the format defined by RFC 3339.""" + custom_types.CLI_DATETIME.VALID_DATETIME_CLI_HELP_MESSAGE) @cli_util.option('--search-query', required=True, help=u"""Query corresponding to the search operation. This query is parsed and validated before execution and should follow the specification. For more information on the query language specification, see [Logging Query Language Specification].""") @cli_util.option('--is-return-field-info', type=click.BOOL, help=u"""Whether to return field schema information for the log stream specified in searchQuery.""") -@cli_util.option('--limit', type=click.INT, help=u"""The maximum number of items to return in a response. Pagination is not supported in this API.""") -@cli_util.option('--page', help=u"""For list pagination. The value of the opc-next-page response header from the previous \"Search\" call. For important details about how pagination works, see [List Pagination].""") +@cli_util.option('--limit', type=click.INT, help=u"""The maximum number of items to return in a response.""") +@cli_util.option('--page', help=u"""For list pagination. The value of the opc-next-page response header from the previous \"Search\" call. The input value can be null but an empty string will return an error. For important details about how pagination works, see [List Pagination].""") @json_skeleton_utils.get_cli_json_input_option({}) @cli_util.help_option @click.pass_context diff --git a/services/usage_api/src/oci_cli_usageapi/generated/usageapi_cli.py b/services/usage_api/src/oci_cli_usageapi/generated/usageapi_cli.py index d8775c5c..2852d783 100644 --- a/services/usage_api/src/oci_cli_usageapi/generated/usageapi_cli.py +++ b/services/usage_api/src/oci_cli_usageapi/generated/usageapi_cli.py @@ -1128,7 +1128,7 @@ def request_summarized_configurations(ctx, from_json, tenant_id): @cli_util.option('--granularity', required=True, type=custom_types.CliCaseInsensitiveChoice(["HOURLY", "DAILY", "MONTHLY", "TOTAL"]), help=u"""The usage granularity. HOURLY - Hourly data aggregation. DAILY - Daily data aggregation. MONTHLY - Monthly data aggregation. TOTAL - Not yet supported.""") @cli_util.option('--is-aggregate-by-time', type=click.BOOL, help=u"""Specifies whether aggregated by time. If isAggregateByTime is true, all usage or cost over the query time period will be added up.""") @cli_util.option('--forecast', type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP) -@cli_util.option('--query-type', type=custom_types.CliCaseInsensitiveChoice(["USAGE", "COST", "CREDIT", "EXPIREDCREDIT", "ALLCREDIT"]), help=u"""The query usage type. COST by default if it is missing. Usage - Query the usage data. Cost - Query the cost/billing data. Credit - Query the credit adjustments data. ExpiredCredit - Query the expired credits data. AllCredit - Query the credit adjustments and expired credit.""") +@cli_util.option('--query-type', type=custom_types.CliCaseInsensitiveChoice(["USAGE", "COST", "CREDIT", "EXPIREDCREDIT", "ALLCREDIT", "USAGE_ONLY"]), help=u"""The query usage type. COST by default if it is missing. Usage - Query the usage data. Cost - Query the cost/billing data. Credit - Query the credit adjustments data. ExpiredCredit - Query the expired credits data. AllCredit - Query the credit adjustments and expired credit. Usage_Only - Query the only usage data without cost or currency.""") @cli_util.option('--group-by', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Aggregate the result by. For example: `[\"tagNamespace\", \"tagKey\", \"tagValue\", \"service\", \"skuName\", \"skuPartNumber\", \"unit\", \"compartmentName\", \"compartmentPath\", \"compartmentId\", \"platform\", \"region\", \"logicalAd\", \"resourceId\", \"tenantId\", \"tenantName\"]`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP) @cli_util.option('--group-by-tag', type=custom_types.CLI_COMPLEX_TYPE, help=u"""GroupBy a specific tagKey. Provide the tagNamespace and tagKey in the tag object. Only supports one tag in the list. For example: `[{\"namespace\":\"oracle\", \"key\":\"createdBy\"]` diff --git a/setup.py b/setup.py index 509807df..6f57a316 100644 --- a/setup.py +++ b/setup.py @@ -30,7 +30,7 @@ def open_relative(*path): readme = f.read() requires = [ - 'oci==2.171.0', + 'oci==2.172.0', 'arrow>=1.0.0,<2.0.0', 'certifi>=2025.1.31,<2026.0.0', 'click==8.0.4', diff --git a/src/oci_cli/version.py b/src/oci_cli/version.py index 3d59c127..3cd5e849 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.79.0' +__version__ = '3.80.0'