From 2b20d2f88fb24ba9ccb98236f79922b3d601bf11 Mon Sep 17 00:00:00 2001 From: Swarn10 Date: Mon, 10 Jun 2024 09:40:39 +0000 Subject: [PATCH] Releasing version 3.43.1 Co-authored-by: Hamada Ibrahim Co-authored-by: Harsh Kumar Co-authored-by: Kanvi Pasricha Co-authored-by: Alex Le Co-authored-by: Nupur Gupta Co-authored-by: Karthik Kamath Co-authored-by: Mandy Tsai Co-authored-by: Pankaj Joshi Co-authored-by: Anup Singh Co-authored-by: Swarnava Sarkar --- CHANGELOG.rst | 37 ++++++++ requirements.txt | 2 +- .../src/oci_cli_config/config_cli_extended.py | 12 +++ .../oci_cli_config/generated/config_cli.py | 67 +++++++++++++++ .../generated/database_cli.py | 58 +++++++------ .../generated/fusionapplications_cli.py | 74 ++++++++++++++++ .../tests/util/generated/command_to_api.py | 2 + .../generated/shardeddatabaseservice_cli.py | 84 ++++++++++++++++++- .../tests/util/generated/command_to_api.py | 1 + .../generated/goldengate_cli.py | 19 +++-- .../generated/monitoring_cli.py | 52 ++++++++++-- .../src/oci_cli_queue/generated/queue_cli.py | 4 +- .../generated/queueadmin_cli.py | 2 +- setup.py | 2 +- src/oci_cli/version.py | 2 +- 15 files changed, 368 insertions(+), 50 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 942b33c00..3a5c44f4c 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -6,6 +6,43 @@ All notable changes to this project will be documented in this file. The format is based on `Keep a Changelog `__. +3.43.1 - 2024-06-11 +-------------------- +Added +~~~~~ +* Globally Distributed Database Service + + * Support for new command + + * ``oci gdd private-endpoint reinstate-proxy-instance`` + + * Support for new optional parameter + + * ``oci gdd private-endpoint get --if-none-match`` + * ``oci gdd sharded-database create-sharded-database-create-dedicated-sharded-database --replication-factor, --replication-method, --replication-unit`` + * ``oci gdd sharded-database generate-gsm-certificate-signing-request --ca-bundle-id`` + * ``oci gdd sharded-database get --if-none-match`` + +* Fusion Applications Environment Management Service + + * Support for data dump initiation and extract in the Fusion Application Service + + * ``oci fusion-apps fusion-environment initiate-extract`` + * ``oci fusion-apps fusion-environment generate-extract-details`` + +* Support for new Action end point in the Application Performance Monitoring Configuration Service + + * ``oci apm-config test span-enrichment-group`` + +* Support for new optional parameters in the Create/Update Alarms API in OCI Monitoring Service. + + * ``oci monitoring alarm create --alarm-summary, --evaluation-slack-duration, --notification-title`` + * ``oci monitoring alarm update --alarm-summary, --evaluation-slack-duration, --notification-title`` + +* Support for addition of create date timestamp in Oracle Queue Service + + * ``oci queue messages get-messages`` + 3.43.0 - 2024-06-04 -------------------- Changed diff --git a/requirements.txt b/requirements.txt index d4258bbdf..16df702cb 100644 --- a/requirements.txt +++ b/requirements.txt @@ -14,7 +14,7 @@ Jinja2==3.0.3 jmespath==0.10.0 ndg-httpsclient==0.4.2 mock==2.0.0 -oci==2.128.0 +oci==2.128.1 packaging==20.2 pluggy==0.13.0 py==1.11.0 diff --git a/services/apm_config/src/oci_cli_config/config_cli_extended.py b/services/apm_config/src/oci_cli_config/config_cli_extended.py index 6ccaeddf6..29af82c88 100644 --- a/services/apm_config/src/oci_cli_config/config_cli_extended.py +++ b/services/apm_config/src/oci_cli_config/config_cli_extended.py @@ -64,3 +64,15 @@ # oci apm-config span-filter validate-span-filter-pattern -> oci apm-config span-filter validate-pattern cli_util.rename_command(config_cli, config_cli.span_filter_group, config_cli.validate_span_filter_pattern, "validate-pattern") + + +# oci apm-config test-output test -> oci apm-config test-output test +cli_util.rename_command(config_cli, config_cli.test_output_group, config_cli.test, "test") + + +# oci apm-config test-output test-test-span-enrichment-details -> oci apm-config test-output span-enrichment-group +cli_util.rename_command(config_cli, config_cli.test_output_group, config_cli.test_test_span_enrichment_details, "span-enrichment-group") + + +# oci apm-config test-output -> oci apm-config test +cli_util.rename_command(config_cli, config_cli.apm_config_root_group, config_cli.test_output_group, "test") diff --git a/services/apm_config/src/oci_cli_config/generated/config_cli.py b/services/apm_config/src/oci_cli_config/generated/config_cli.py index 4172d5f12..36bb580d8 100644 --- a/services/apm_config/src/oci_cli_config/generated/config_cli.py +++ b/services/apm_config/src/oci_cli_config/generated/config_cli.py @@ -47,10 +47,17 @@ def config_group(): pass +@click.command(cli_util.override('apm_config.test_output_group.command_name', 'test-output'), cls=CommandGroupWithAlias, help="""The result of running a test.""") +@cli_util.help_option_group +def test_output_group(): + pass + + apm_config_root_group.add_command(metric_group_group) apm_config_root_group.add_command(span_filter_group) apm_config_root_group.add_command(config_collection_group) apm_config_root_group.add_command(config_group) +apm_config_root_group.add_command(test_output_group) @config_group.command(name=cli_util.override('apm_config.create_config.command_name', 'create'), help=u"""Creates a new configuration item. \n[Command Reference](createConfig)""") @@ -448,6 +455,66 @@ def retrieve_namespaces(ctx, from_json, apm_domain_id): cli_util.render_response(result, ctx) +@test_output_group.command(name=cli_util.override('apm_config.test.command_name', 'test'), help=u"""Tests a data processing operation on the provided input, returning the potentially modified input as output. Returns 200 on success, 422 when the input can not be processed. \n[Command Reference](test)""") +@cli_util.option('--apm-domain-id', required=True, help=u"""The APM Domain ID the request is intended for.""") +@cli_util.option('--test-type', required=True, type=custom_types.CliCaseInsensitiveChoice(["SPAN_ENRICHMENT"]), help=u"""The kind of test to run.""") +@json_skeleton_utils.get_cli_json_input_option({}) +@cli_util.help_option +@click.pass_context +@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'apm_config', 'class': 'TestOutput'}) +@cli_util.wrap_exceptions +def test(ctx, from_json, apm_domain_id, test_type): + + kwargs = {} + kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id']) + + _details = {} + _details['testType'] = test_type + + client = cli_util.build_client('apm_config', 'config', ctx) + result = client.test( + apm_domain_id=apm_domain_id, + test_details=_details, + **kwargs + ) + cli_util.render_response(result, ctx) + + +@test_output_group.command(name=cli_util.override('apm_config.test_test_span_enrichment_details.command_name', 'test-test-span-enrichment-details'), help=u"""Tests a data processing operation on the provided input, returning the potentially modified input as output. Returns 200 on success, 422 when the input can not be processed. \n[Command Reference](test)""") +@cli_util.option('--apm-domain-id', required=True, help=u"""The APM Domain ID the request is intended for.""") +@cli_util.option('--options', required=True, type=custom_types.CLI_COMPLEX_TYPE, help=u"""The span enrichment rules to test in the format of an Options resource.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP) +@cli_util.option('--span', required=True, type=custom_types.CLI_COMPLEX_TYPE, help=u"""The span to test the rules on. This should be a valid JSON object that follows one of the formats used by distributed tracing frameworks, such as OpenTelemetry, Zipkin, or Oracle Application Performance Monitoring.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP) +@cli_util.option('--filters', type=custom_types.CLI_COMPLEX_TYPE, help=u"""A list of filters to try against the given span. + +This option is a JSON list with items of type FilterTextOrId. For documentation on FilterTextOrId please see our API reference: https://docs.cloud.oracle.com/api/#/en/config/20210201/datatypes/FilterTextOrId.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP) +@json_skeleton_utils.get_cli_json_input_option({'options': {'module': 'apm_config', 'class': 'object'}, 'filters': {'module': 'apm_config', 'class': 'list[FilterTextOrId]'}, 'span': {'module': 'apm_config', 'class': 'object'}}) +@cli_util.help_option +@click.pass_context +@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'options': {'module': 'apm_config', 'class': 'object'}, 'filters': {'module': 'apm_config', 'class': 'list[FilterTextOrId]'}, 'span': {'module': 'apm_config', 'class': 'object'}}, output_type={'module': 'apm_config', 'class': 'TestOutput'}) +@cli_util.wrap_exceptions +def test_test_span_enrichment_details(ctx, from_json, apm_domain_id, options, span, filters): + + kwargs = {} + kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id']) + + _details = {} + _details['options'] = cli_util.parse_json_parameter("options", options) + _details['span'] = cli_util.parse_json_parameter("span", span) + + if filters is not None: + _details['filters'] = cli_util.parse_json_parameter("filters", filters) + + _details['testType'] = 'SPAN_ENRICHMENT' + + client = cli_util.build_client('apm_config', 'config', ctx) + result = client.test( + apm_domain_id=apm_domain_id, + test_details=_details, + **kwargs + ) + cli_util.render_response(result, ctx) + + @config_group.command(name=cli_util.override('apm_config.update_config.command_name', 'update'), help=u"""Updates the details of the configuration item identified by the OCID. \n[Command Reference](updateConfig)""") @cli_util.option('--apm-domain-id', required=True, help=u"""The APM Domain ID the request is intended for.""") @cli_util.option('--config-id', required=True, help=u"""The [OCID] of the configuration item.""") 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 3ba663239..efc33d880 100644 --- a/services/database/src/oci_cli_database/generated/database_cli.py +++ b/services/database/src/oci_cli_database/generated/database_cli.py @@ -4715,7 +4715,7 @@ def create_autonomous_database_create_cross_region_disaster_recovery_details(ctx @autonomous_database_group.command(name=cli_util.override('db.create_autonomous_database_create_cross_tenancy_disaster_recovery_details.command_name', 'create-autonomous-database-create-cross-tenancy-disaster-recovery-details'), help=u"""Creates a new Autonomous Database. \n[Command Reference](createAutonomousDatabase)""") @cli_util.option('--compartment-id', required=True, help=u"""The [OCID] of the compartment of the Autonomous Database.""") -@cli_util.option('--source-id', required=True, help=u"""The [OCID] of the source Autonomous Database that will be used to create a new standby database for the DR association.""") +@cli_util.option('--source-id', required=True, help=u"""The [OCID] of the source Autonomous Database that will be used to create a new peer database for the DR association.""") @cli_util.option('--disaster-recovery-type', required=True, help=u"""Indicates the disaster recovery (DR) type of the standby Autonomous Database Serverless instance. Autonomous Data Guard (ADG) DR type provides business critical DR with a faster recovery time objective (RTO) during failover or switchover. Backup-based DR type provides lower cost DR with a slower RTO during failover or switchover.""") @cli_util.option('--character-set', help=u"""The character set for the autonomous database. The default is AL32UTF8. Allowed values for an Autonomous Database Serverless instance as as returned by [List Autonomous Database Character Sets] @@ -4723,16 +4723,16 @@ def create_autonomous_database_create_cross_region_disaster_recovery_details(ctx AL32UTF8, AR8ADOS710, AR8ADOS720, AR8APTEC715, AR8ARABICMACS, AR8ASMO8X, AR8ISO8859P6, AR8MSWIN1256, AR8MUSSAD768, AR8NAFITHA711, AR8NAFITHA721, AR8SAKHR706, AR8SAKHR707, AZ8ISO8859P9E, BG8MSWIN, BG8PC437S, BLT8CP921, BLT8ISO8859P13, BLT8MSWIN1257, BLT8PC775, BN8BSCII, CDN8PC863, CEL8ISO8859P14, CL8ISO8859P5, CL8ISOIR111, CL8KOI8R, CL8KOI8U, CL8MACCYRILLICS, CL8MSWIN1251, EE8ISO8859P2, EE8MACCES, EE8MACCROATIANS, EE8MSWIN1250, EE8PC852, EL8DEC, EL8ISO8859P7, EL8MACGREEKS, EL8MSWIN1253, EL8PC437S, EL8PC851, EL8PC869, ET8MSWIN923, HU8ABMOD, HU8CWI2, IN8ISCII, IS8PC861, IW8ISO8859P8, IW8MACHEBREWS, IW8MSWIN1255, IW8PC1507, JA16EUC, JA16EUCTILDE, JA16SJIS, JA16SJISTILDE, JA16VMS, KO16KSC5601, KO16KSCCS, KO16MSWIN949, LA8ISO6937, LA8PASSPORT, LT8MSWIN921, LT8PC772, LT8PC774, LV8PC1117, LV8PC8LR, LV8RST104090, N8PC865, NE8ISO8859P10, NEE8ISO8859P4, RU8BESTA, RU8PC855, RU8PC866, SE8ISO8859P3, TH8MACTHAIS, TH8TISASCII, TR8DEC, TR8MACTURKISHS, TR8MSWIN1254, TR8PC857, US7ASCII, US8PC437, UTF8, VN8MSWIN1258, VN8VN3, WE8DEC, WE8DG, WE8ISO8859P1, WE8ISO8859P15, WE8ISO8859P9, WE8MACROMAN8S, WE8MSWIN1252, WE8NCR4970, WE8NEXTSTEP, WE8PC850, WE8PC858, WE8PC860, WE8ROMAN8, ZHS16CGB231280, ZHS16GBK, ZHT16BIG5, ZHT16CCDC, ZHT16DBT, ZHT16HKSCS, ZHT16MSWIN950, ZHT32EUC, ZHT32SOPS, ZHT32TRIS""") @cli_util.option('--ncharacter-set', help=u"""The character set for the Autonomous Database. The default is AL32UTF8. Use [List Autonomous Database Character Sets] to list the allowed values for an Autonomous Database Serverless instance. For an Autonomous Database on dedicated Exadata infrastructure, the allowed values are: AL16UTF16 or UTF8.""") -@cli_util.option('--db-name', help=u"""The database name. The name must begin with an alphabetic character and can contain a maximum of 14 alphanumeric characters. Special characters are not permitted. The database name must be unique in the tenancy. It is required in all cases except when creating a cross-region Autonomous Data Guard standby instance or a cross-region disaster recovery standby instance.""") -@cli_util.option('--cpu-core-count', type=click.INT, help=u"""The number of OCPU cores to be made available to the database. For Autonomous Databases on dedicated Exadata infrastructure, the maximum number of cores is determined by the infrastructure shape. See [Characteristics of Infrastructure Shapes] for shape details. +@cli_util.option('--db-name', help=u"""The database name. The name must begin with an alphabetic character and can contain a maximum of 30 alphanumeric characters. Special characters are not permitted. The database name must be unique in the tenancy. It is required in all cases except when creating a cross-region Autonomous Data Guard standby instance or a cross-region disaster recovery standby instance.""") +@cli_util.option('--cpu-core-count', type=click.INT, help=u"""The number of CPU cores to be made available to the database. For Autonomous Databases on dedicated Exadata infrastructure, the maximum number of cores is determined by the infrastructure shape. See [Characteristics of Infrastructure Shapes] for shape details. **Note:** This parameter cannot be used with the `ocpuCount` parameter.""") @cli_util.option('--backup-retention-period-in-days', type=click.INT, help=u"""Retention period, in days, for long-term backups""") -@cli_util.option('--compute-model', type=custom_types.CliCaseInsensitiveChoice(["ECPU", "OCPU"]), help=u"""The compute model of the Autonomous Database. This is required if using the `computeCount` parameter. If using `cpuCoreCount` then it is an error to specify `computeModel` to a non-null value.""") -@cli_util.option('--compute-count', type=click.FLOAT, help=u"""The compute amount available to the database. Minimum and maximum values depend on the compute model and whether the database is an Autonomous Database Serverless instance or an Autonomous Database on Dedicated Exadata Infrastructure, the 'ECPU' compute model requires values in multiples of two. Required when using the `computeModel` parameter. When using `cpuCoreCount` parameter, it is an error to specify computeCount to a non-null value.""") +@cli_util.option('--compute-model', type=custom_types.CliCaseInsensitiveChoice(["ECPU", "OCPU"]), help=u"""The compute model of the Autonomous Database. This is required if using the `computeCount` parameter. If using `cpuCoreCount` then it is an error to specify `computeModel` to a non-null value. ECPU compute model is the recommended model and OCPU compute model is legacy.""") +@cli_util.option('--compute-count', type=click.FLOAT, help=u"""The compute amount (CPUs) available to the database. Minimum and maximum values depend on the compute model and whether the database is an Autonomous Database Serverless instance or an Autonomous Database on Dedicated Exadata Infrastructure. For an Autonomous Database Serverless instance, the 'ECPU' compute model requires a minimum value of one, for databases in the elastic resource pool and minimum value of two, otherwise. Required when using the `computeModel` parameter. When using `cpuCoreCount` parameter, it is an error to specify computeCount to a non-null value. Providing `computeModel` and `computeCount` is the preferred method for both OCPU and ECPU.""") @cli_util.option('--ocpu-count', type=click.FLOAT, help=u"""The number of OCPU cores to be made available to the database. -The following points apply: - For Autonomous Databases on Dedicated Exadata infrastructure, to provision less than 1 core, enter a fractional value in an increment of 0.1. For example, you can provision 0.3 or 0.4 cores, but not 0.35 cores. (Note that fractional OCPU values are not supported for Autonomous Database Serverless instances.) - To provision 1 or more cores, you must enter an integer between 1 and the maximum number of cores available for the infrastructure shape. For example, you can provision 2 cores or 3 cores, but not 2.5 cores. This applies to an Autonomous Database Serverless instance or an Autonomous Database on Dedicated Exadata Infrastructure. +The following points apply: - For Autonomous Databases on Dedicated Exadata infrastructure, to provision less than 1 core, enter a fractional value in an increment of 0.1. For example, you can provision 0.3 or 0.4 cores, but not 0.35 cores. (Note that fractional OCPU values are not supported for Autonomous Database Serverless instances.) - To provision 1 or more cores, you must enter an integer between 1 and the maximum number of cores available for the infrastructure shape. For example, you can provision 2 cores or 3 cores, but not 2.5 cores. This applies to an Autonomous Database Serverless instance or an Autonomous Database on Dedicated Exadata Infrastructure. - For Autonomous Database Serverless instances, this parameter is not used. For Autonomous Databases on Dedicated Exadata infrastructure, the maximum number of cores is determined by the infrastructure shape. See [Characteristics of Infrastructure Shapes] for shape details. @@ -4752,33 +4752,34 @@ def create_autonomous_database_create_cross_region_disaster_recovery_details(ctx This cannot be updated in parallel with any of the following: licenseModel, dbEdition, cpuCoreCount, computeCount, computeModel, adminPassword, whitelistedIps, isMTLSConnectionRequired, openMode, permissionLevel, privateEndpointLabel, nsgIds, dbVersion, isRefreshable, dbName, scheduledOperations, dbToolsDetails, or isLocalDataGuardEnabled""") @cli_util.option('--kms-key-id', help=u"""The OCID of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations.""") -@cli_util.option('--vault-id', help=u"""The [OCID] of the Oracle Cloud Infrastructure [vault].""") +@cli_util.option('--vault-id', help=u"""The [OCID] of the Oracle Cloud Infrastructure [vault]. This parameter and `secretId` are required for Customer Managed Keys.""") @cli_util.option('--admin-password', help=u"""**Important** The `adminPassword` or `secretId` must be specified for all Autonomous Databases except for refreshable clones. The password must be between 12 and 30 characters long, and must contain at least 1 uppercase, 1 lowercase, and 1 numeric character. It cannot contain the double quote symbol (\") or the username \"admin\", regardless of casing. This cannot be used in conjunction with with OCI vault secrets (secretId).""") @cli_util.option('--display-name', help=u"""The user-friendly name for the Autonomous Database. The name does not have to be unique.""") -@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 Oracle Autonomous Database. Bring your own license (BYOL) allows you to apply your current on-premises Oracle software licenses to equivalent, highly automated Oracle services in the cloud. License Included allows you to subscribe to new Oracle Database software licenses and the Oracle Database service. Note that when provisioning an [Autonomous Database on dedicated Exadata infrastructure], this attribute must be null. It is already set at the Autonomous Exadata Infrastructure level. When provisioning an [Autonomous Database Serverless] database, if a value is not specified, the system defaults the value to `BRING_YOUR_OWN_LICENSE`. +@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 Oracle Autonomous Database. Bring your own license (BYOL) allows you to apply your current on-premises Oracle software licenses to equivalent, highly automated Oracle services in the cloud. License Included allows you to subscribe to new Oracle Database software licenses and the Oracle Database service. Note that when provisioning an [Autonomous Database on dedicated Exadata infrastructure], this attribute must be null. It is already set at the Autonomous Exadata Infrastructure level. When provisioning an [Autonomous Database Serverless] database, if a value is not specified, the system defaults the value to `BRING_YOUR_OWN_LICENSE`. Bring your own license (BYOL) also allows you to select the DB edition using the optional parameter. -This cannot be updated in parallel with any of the following: cpuCoreCount, computeCount, maxCpuCoreCount, dataStorageSizeInTBs, adminPassword, isMTLSConnectionRequired, dbWorkload, privateEndpointLabel, nsgIds, dbVersion, dbName, scheduledOperations, dbToolsDetails, or isFreeTier.""") -@cli_util.option('--is-preview-version-with-service-terms-accepted', type=click.BOOL, help=u"""If set to `TRUE`, indicates that an Autonomous Database preview version is being provisioned, and that the preview version's terms of service have been accepted. Note that preview version software is only available for Autonomous Database Serverless instances (https://docs.oracle.com/en/cloud/paas/autonomous-database/shared/index.html).""") -@cli_util.option('--is-auto-scaling-enabled', type=click.BOOL, help=u"""Indicates if auto scaling is enabled for the Autonomous Database OCPU core count. The default value is `FALSE`.""") +This cannot be updated in parallel with any of the following: cpuCoreCount, computeCount, dataStorageSizeInTBs, adminPassword, isMTLSConnectionRequired, dbWorkload, privateEndpointLabel, nsgIds, dbVersion, dbName, scheduledOperations, dbToolsDetails, or isFreeTier.""") +@cli_util.option('--is-preview-version-with-service-terms-accepted', type=click.BOOL, help=u"""If set to `TRUE`, indicates that an Autonomous Database preview version is being provisioned, and that the preview version's terms of service have been accepted. Note that preview version software is only available for Autonomous Database Serverless instances (https://docs.oracle.com/en/cloud/paas/autonomous-database/serverless/).""") +@cli_util.option('--is-auto-scaling-enabled', type=click.BOOL, help=u"""Indicates if auto scaling is enabled for the Autonomous Database CPU core count. The default value is `TRUE`.""") +@cli_util.option('--is-dev-tier', type=click.BOOL, help=u"""Autonomous Database for Developers are free Autonomous Databases that developers can use to build and test new applications.With Autonomous these database instancess instances, you can try new Autonomous Database features for free and apply them to ongoing or new development projects. Developer database comes with limited resources and is, therefore, not suitable for large-scale testing and production deployments. When you need more compute or storage resources, you can transition to a paid database licensing by cloning your developer database into a regular Autonomous Database. See [Autonomous Database documentation] for more details.""") @cli_util.option('--is-dedicated', type=click.BOOL, help=u"""True if the database is on [dedicated Exadata infrastructure].""") -@cli_util.option('--autonomous-container-database-id', help=u"""The Autonomous Container Database [OCID].""") -@cli_util.option('--in-memory-percentage', type=click.INT, help=u"""The percentage of the System Global Area(SGA) assigned to In-Memory tables in Autonomous Database.""") +@cli_util.option('--autonomous-container-database-id', help=u"""The Autonomous Container Database [OCID]. Used only by Autonomous Database on Dedicated Exadata Infrastructure.""") +@cli_util.option('--in-memory-percentage', type=click.INT, help=u"""The percentage of the System Global Area(SGA) assigned to In-Memory tables in Autonomous Database. This property is applicable only to Autonomous Databases on the Exadata Cloud@Customer platform.""") @cli_util.option('--is-access-control-enabled', type=click.BOOL, help=u"""Indicates if the database-level access control is enabled. If disabled, database access is defined by the network security rules. If enabled, database access is restricted to the IP addresses defined by the rules specified with the `whitelistedIps` property. While specifying `whitelistedIps` rules is optional, if database-level access control is enabled and no rules are specified, the database will become inaccessible. The rules can be added later using the `UpdateAutonomousDatabase` API operation or edit option in console. When creating a database clone, the desired access control setting should be specified. By default, database-level access control will be disabled for the clone. -This property is applicable only to Autonomous Databases on the Exadata Cloud@Customer platform.""") -@cli_util.option('--whitelisted-ips', type=custom_types.CLI_COMPLEX_TYPE, help=u"""The client IP access control list (ACL). This feature is available for [Autonomous Database Serverless] and on Exadata Cloud@Customer. Only clients connecting from an IP address included in the ACL may access the Autonomous Database instance. +This property is applicable only to Autonomous Databases on the Exadata Cloud@Customer platform. For Autonomous Database Serverless instances, `whitelistedIps` is used.""") +@cli_util.option('--whitelisted-ips', type=custom_types.CLI_COMPLEX_TYPE, help=u"""The client IP access control list (ACL). This feature is available for [Autonomous Database Serverless] and on Exadata Cloud@Customer. Only clients connecting from an IP address included in the ACL may access the Autonomous Database instance. If `arePrimaryWhitelistedIpsUsed` is 'TRUE' then Autonomous Database uses this primary's IP access control list (ACL) for the disaster recovery peer called `standbywhitelistedips`. -For Autonomous Database Serverless, this is an array of CIDR (classless inter-domain routing) notations for a subnet or VCN OCID (virtual cloud network Oracle Cloud ID). Use a semicolon (;) as a deliminator between the VCN-specific subnets or IPs. Example: `[\"1.1.1.1\",\"1.1.1.0/24\",\"ocid1.vcn.oc1.sea.\",\"ocid1.vcn.oc1.sea.;1.1.1.1\",\"ocid1.vcn.oc1.sea.;1.1.0.0/16\"]` For Exadata Cloud@Customer, this is an array of IP addresses or CIDR notations. Example: `[\"1.1.1.1\",\"1.1.1.0/24\",\"1.1.2.25\"]` +For Autonomous Database Serverless, this is an array of CIDR (classless inter-domain routing) notations for a subnet or VCN OCID (virtual cloud network Oracle Cloud ID). Multiple IPs and VCN OCIDs should be separate strings separated by commas, but if it\u2019s other configurations that need multiple pieces of information then its each piece is connected with semicolon (;) as a delimiter. Example: `[\"1.1.1.1\",\"1.1.1.0/24\",\"ocid1.vcn.oc1.sea.\",\"ocid1.vcn.oc1.sea.;1.1.1.1\",\"ocid1.vcn.oc1.sea.;1.1.0.0/16\"]` For Exadata Cloud@Customer, this is an array of IP addresses or CIDR notations. Example: `[\"1.1.1.1\",\"1.1.1.0/24\",\"1.1.2.25\"]` For an update operation, if you want to delete all the IPs in the ACL, use an array with a single empty string entry. This cannot be updated in parallel with any of the following: licenseModel, dbEdition, cpuCoreCount, computeCount, computeModel, adminPassword, isMTLSConnectionRequired, openMode, permissionLevel, dbWorkload, dbVersion, isRefreshable, dbName, scheduledOperations, dbToolsDetails, isLocalDataGuardEnabled, or isFreeTier.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP) @cli_util.option('--are-primary-whitelisted-ips-used', type=click.BOOL, help=u"""This field will be null if the Autonomous Database is not Data Guard enabled or Access Control is disabled. It's value would be `TRUE` if Autonomous Database is Data Guard enabled and Access Control is enabled and if the Autonomous Database uses primary IP access control list (ACL) for standby. It's value would be `FALSE` if Autonomous Database is Data Guard enabled and Access Control is enabled and if the Autonomous Database uses different IP access control list (ACL) for standby compared to primary.""") -@cli_util.option('--standby-whitelisted-ips', type=custom_types.CLI_COMPLEX_TYPE, help=u"""The client IP access control list (ACL). This feature is available for [Autonomous Database Serverless] and on Exadata Cloud@Customer. Only clients connecting from an IP address included in the ACL may access the Autonomous Database instance. +@cli_util.option('--standby-whitelisted-ips', type=custom_types.CLI_COMPLEX_TYPE, help=u"""The client IP access control list (ACL). This feature is available for [Autonomous Database Serverless] and on Exadata Cloud@Customer. Only clients connecting from an IP address included in the ACL may access the Autonomous Database instance. If `arePrimaryWhitelistedIpsUsed` is 'TRUE' then Autonomous Database uses this primary's IP access control list (ACL) for the disaster recovery peer called `standbywhitelistedips`. -For Autonomous Database Serverless, this is an array of CIDR (classless inter-domain routing) notations for a subnet or VCN OCID (virtual cloud network Oracle Cloud ID). Use a semicolon (;) as a deliminator between the VCN-specific subnets or IPs. Example: `[\"1.1.1.1\",\"1.1.1.0/24\",\"ocid1.vcn.oc1.sea.\",\"ocid1.vcn.oc1.sea.;1.1.1.1\",\"ocid1.vcn.oc1.sea.;1.1.0.0/16\"]` For Exadata Cloud@Customer, this is an array of IP addresses or CIDR notations. Example: `[\"1.1.1.1\",\"1.1.1.0/24\",\"1.1.2.25\"]` +For Autonomous Database Serverless, this is an array of CIDR (classless inter-domain routing) notations for a subnet or VCN OCID (virtual cloud network Oracle Cloud ID). Multiple IPs and VCN OCIDs should be separate strings separated by commas, but if it\u2019s other configurations that need multiple pieces of information then its each piece is connected with semicolon (;) as a delimiter. Example: `[\"1.1.1.1\",\"1.1.1.0/24\",\"ocid1.vcn.oc1.sea.\",\"ocid1.vcn.oc1.sea.;1.1.1.1\",\"ocid1.vcn.oc1.sea.;1.1.0.0/16\"]` For Exadata Cloud@Customer, this is an array of IP addresses or CIDR notations. Example: `[\"1.1.1.1\",\"1.1.1.0/24\",\"1.1.2.25\"]` For an update operation, if you want to delete all the IPs in the ACL, use an array with a single empty string entry. @@ -4791,7 +4792,7 @@ def create_autonomous_database_create_cross_region_disaster_recovery_details(ctx These subnets are used by the Oracle Clusterware private interconnect on the database instance. Specifying an overlapping subnet will cause the private interconnect to malfunction. This restriction applies to both the client subnet and the backup subnet.""") @cli_util.option('--nsg-ids', type=custom_types.CLI_COMPLEX_TYPE, help=u"""The list of [OCIDs] for the network security groups (NSGs) to which this resource belongs. Setting this to an empty list removes all resources from all NSGs. For more information about NSGs, see [Security Rules]. **NsgIds restrictions:** - A network security group (NSG) is optional for Autonomous Databases with private access. The nsgIds list can be empty.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP) -@cli_util.option('--private-endpoint-label', help=u"""The resource's private endpoint label. Setting this to an empty string, after the creation of the private endpoint database, changes the private endpoint database to a public endpoint database. +@cli_util.option('--private-endpoint-label', help=u"""The resource's private endpoint label. - Setting the endpoint label to a non-empty string creates a private endpoint database. - Resetting the endpoint label to an empty string, after the creation of the private endpoint database, changes the private endpoint database to a public endpoint database. - Setting the endpoint label to a non-empty string value, updates to a new private endpoint database, when the database is disabled and re-enabled. This setting cannot be updated in parallel with any of the following: licenseModel, dbEdition, cpuCoreCount, computeCount, computeModel, adminPassword, whitelistedIps, isMTLSConnectionRequired, dbWorkload, dbVersion, isRefreshable, dbName, scheduledOperations, dbToolsDetails, or isFreeTier.""") @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]. @@ -4805,20 +4806,19 @@ def create_autonomous_database_create_cross_region_disaster_recovery_details(ctx This option is a JSON list with items of type CustomerContact. For documentation on CustomerContact please see our API reference: https://docs.cloud.oracle.com/api/#/en/database/20160918/datatypes/CustomerContact.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP) @cli_util.option('--is-mtls-connection-required', type=click.BOOL, help=u"""Specifies if the Autonomous Database requires mTLS connections. -This may not be updated in parallel with any of the following: licenseModel, databaseEdition, cpuCoreCount, computeCount, maxCpuCoreCount, dataStorageSizeInTBs, whitelistedIps, openMode, permissionLevel, db-workload, privateEndpointLabel, nsgIds, customerContacts, dbVersion, scheduledOperations, dbToolsDetails, isLocalDataGuardEnabled, or isFreeTier. +This may not be updated in parallel with any of the following: licenseModel, databaseEdition, cpuCoreCount, computeCount, dataStorageSizeInTBs, whitelistedIps, openMode, permissionLevel, db-workload, privateEndpointLabel, nsgIds, customerContacts, dbVersion, scheduledOperations, dbToolsDetails, isLocalDataGuardEnabled, or isFreeTier. Service Change: The default value of the isMTLSConnectionRequired attribute will change from true to false on July 1, 2023 in the following APIs: - CreateAutonomousDatabase - GetAutonomousDatabase - UpdateAutonomousDatabase Details: Prior to the July 1, 2023 change, the isMTLSConnectionRequired attribute default value was true. This applies to Autonomous Database Serverless. Does this impact me? If you use or maintain custom scripts or Terraform scripts referencing the CreateAutonomousDatabase, GetAutonomousDatabase, or UpdateAutonomousDatabase APIs, you want to check, and possibly modify, the scripts for the changed default value of the attribute. Should you choose not to leave your scripts unchanged, the API calls containing this attribute will continue to work, but the default value will switch from true to false. How do I make this change? Using either OCI SDKs or command line tools, update your custom scripts to explicitly set the isMTLSConnectionRequired attribute to true.""") @cli_util.option('--resource-pool-leader-id', help=u"""The unique identifier for leader autonomous database OCID [OCID].""") @cli_util.option('--resource-pool-summary', type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP) @cli_util.option('--autonomous-maintenance-schedule-type', type=custom_types.CliCaseInsensitiveChoice(["EARLY", "REGULAR"]), help=u"""The maintenance schedule type of the Autonomous Database Serverless. An EARLY maintenance schedule follows a schedule applying patches prior to the REGULAR schedule. A REGULAR maintenance schedule follows the normal cycle""") -@cli_util.option('--scheduled-operations', type=custom_types.CLI_COMPLEX_TYPE, help=u"""The list of scheduled operations. +@cli_util.option('--scheduled-operations', type=custom_types.CLI_COMPLEX_TYPE, help=u"""The list of scheduled operations. Consists of values such as dayOfWeek, scheduledStartTime, scheduledStopTime. This cannot be updated in parallel with any of the following: licenseModel, dbEdition, cpuCoreCount, computeCount, computeModel, whitelistedIps, isMTLSConnectionRequired, openMode, permissionLevel, dbWorkload, privateEndpointLabel, nsgIds, dbVersion, isRefreshable, dbName, dbToolsDetails, isLocalDataGuardEnabled, or isFreeTier. This option is a JSON list with items of type ScheduledOperationDetails. For documentation on ScheduledOperationDetails please see our API reference: https://docs.cloud.oracle.com/api/#/en/database/20160918/datatypes/ScheduledOperationDetails.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP) @cli_util.option('--is-auto-scaling-for-storage-enabled', type=click.BOOL, help=u"""Indicates if auto scaling is enabled for the Autonomous Database storage. The default value is `FALSE`.""") -@cli_util.option('--max-cpu-core-count', type=click.INT, help=u"""The number of Max OCPU cores to be made available to the autonomous database with auto scaling of cpu enabled.""") -@cli_util.option('--database-edition', help=u"""The Oracle Database Edition that applies to the Autonomous databases.""") +@cli_util.option('--database-edition', help=u"""The Oracle Database Edition that applies to the Autonomous databases. This parameter accepts options `STANDARD_EDITION` and `ENTERPRISE_EDITION`.""") @cli_util.option('--db-tools-details', type=custom_types.CLI_COMPLEX_TYPE, help=u"""The list of database tools details. This cannot be updated in parallel with any of the following: licenseModel, dbEdition, cpuCoreCount, computeCount, computeModel, whitelistedIps, isMTLSConnectionRequired, openMode, permissionLevel, dbWorkload, privateEndpointLabel, nsgIds, dbVersion, isRefreshable, dbName, scheduledOperations, isLocalDataGuardEnabled, or isFreeTier. @@ -4828,6 +4828,7 @@ def create_autonomous_database_create_cross_region_disaster_recovery_details(ctx This cannot be used in conjunction with adminPassword.""") @cli_util.option('--secret-version-number', type=click.INT, help=u"""The version of the vault secret. If no version is specified, the latest version will be used.""") +@cli_util.option('--is-replicate-automatic-backups', type=click.BOOL, help=u"""If true, 7 days worth of backups are replicated across regions for Cross-Region ADB or Backup-Based DR between Primary and Standby. If false, the backups taken on the Primary are not replicated to the Standby database.""") @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["PROVISIONING", "AVAILABLE", "STOPPING", "STOPPED", "STARTING", "TERMINATING", "TERMINATED", "UNAVAILABLE", "RESTORE_IN_PROGRESS", "RESTORE_FAILED", "BACKUP_IN_PROGRESS", "SCALE_IN_PROGRESS", "AVAILABLE_NEEDS_ATTENTION", "UPDATING", "MAINTENANCE_IN_PROGRESS", "RESTARTING", "RECREATING", "ROLE_CHANGE_IN_PROGRESS", "UPGRADING", "INACCESSIBLE", "STANDBY"]), multiple=True, help="""This operation creates, modifies or deletes a resource that has a defined lifecycle state. Specify this option to perform the action and then wait until the resource reaches a given lifecycle state. Multiple states can be specified, returning on the first state. For example, --wait-for-state SUCCEEDED --wait-for-state FAILED would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.""") @cli_util.option('--max-wait-seconds', type=click.INT, help="""The maximum time to wait for the resource to reach the lifecycle state defined by --wait-for-state. Defaults to 1200 seconds.""") @cli_util.option('--wait-interval-seconds', type=click.INT, help="""Check every --wait-interval-seconds to see whether the resource has reached the lifecycle state defined by --wait-for-state. Defaults to 30 seconds.""") @@ -4836,7 +4837,7 @@ def create_autonomous_database_create_cross_region_disaster_recovery_details(ctx @click.pass_context @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'whitelisted-ips': {'module': 'database', 'class': 'list[string]'}, 'standby-whitelisted-ips': {'module': 'database', 'class': 'list[string]'}, '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))'}, 'customer-contacts': {'module': 'database', 'class': 'list[CustomerContact]'}, 'resource-pool-summary': {'module': 'database', 'class': 'ResourcePoolSummary'}, 'scheduled-operations': {'module': 'database', 'class': 'list[ScheduledOperationDetails]'}, 'db-tools-details': {'module': 'database', 'class': 'list[DatabaseTool]'}}, output_type={'module': 'database', 'class': 'AutonomousDatabase'}) @cli_util.wrap_exceptions -def create_autonomous_database_create_cross_tenancy_disaster_recovery_details(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, compartment_id, source_id, disaster_recovery_type, character_set, ncharacter_set, db_name, cpu_core_count, backup_retention_period_in_days, compute_model, compute_count, ocpu_count, db_workload, data_storage_size_in_tbs, data_storage_size_in_gbs, is_free_tier, kms_key_id, vault_id, admin_password, display_name, license_model, is_preview_version_with_service_terms_accepted, is_auto_scaling_enabled, is_dedicated, autonomous_container_database_id, in_memory_percentage, is_access_control_enabled, whitelisted_ips, are_primary_whitelisted_ips_used, standby_whitelisted_ips, is_data_guard_enabled, is_local_data_guard_enabled, subnet_id, nsg_ids, private_endpoint_label, freeform_tags, defined_tags, private_endpoint_ip, db_version, customer_contacts, is_mtls_connection_required, resource_pool_leader_id, resource_pool_summary, autonomous_maintenance_schedule_type, scheduled_operations, is_auto_scaling_for_storage_enabled, max_cpu_core_count, database_edition, db_tools_details, secret_id, secret_version_number): +def create_autonomous_database_create_cross_tenancy_disaster_recovery_details(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, compartment_id, source_id, disaster_recovery_type, character_set, ncharacter_set, db_name, cpu_core_count, backup_retention_period_in_days, compute_model, compute_count, ocpu_count, db_workload, data_storage_size_in_tbs, data_storage_size_in_gbs, is_free_tier, kms_key_id, vault_id, admin_password, display_name, license_model, is_preview_version_with_service_terms_accepted, is_auto_scaling_enabled, is_dev_tier, is_dedicated, autonomous_container_database_id, in_memory_percentage, is_access_control_enabled, whitelisted_ips, are_primary_whitelisted_ips_used, standby_whitelisted_ips, is_data_guard_enabled, is_local_data_guard_enabled, subnet_id, nsg_ids, private_endpoint_label, freeform_tags, defined_tags, private_endpoint_ip, db_version, customer_contacts, is_mtls_connection_required, resource_pool_leader_id, resource_pool_summary, autonomous_maintenance_schedule_type, scheduled_operations, is_auto_scaling_for_storage_enabled, database_edition, db_tools_details, secret_id, secret_version_number, is_replicate_automatic_backups): kwargs = {} kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id']) @@ -4903,6 +4904,9 @@ def create_autonomous_database_create_cross_tenancy_disaster_recovery_details(ct if is_auto_scaling_enabled is not None: _details['isAutoScalingEnabled'] = is_auto_scaling_enabled + if is_dev_tier is not None: + _details['isDevTier'] = is_dev_tier + if is_dedicated is not None: _details['isDedicated'] = is_dedicated @@ -4972,9 +4976,6 @@ def create_autonomous_database_create_cross_tenancy_disaster_recovery_details(ct if is_auto_scaling_for_storage_enabled is not None: _details['isAutoScalingForStorageEnabled'] = is_auto_scaling_for_storage_enabled - if max_cpu_core_count is not None: - _details['maxCpuCoreCount'] = max_cpu_core_count - if database_edition is not None: _details['databaseEdition'] = database_edition @@ -4987,6 +4988,9 @@ def create_autonomous_database_create_cross_tenancy_disaster_recovery_details(ct if secret_version_number is not None: _details['secretVersionNumber'] = secret_version_number + if is_replicate_automatic_backups is not None: + _details['isReplicateAutomaticBackups'] = is_replicate_automatic_backups + _details['source'] = 'CROSS_TENANCY_DISASTER_RECOVERY' client = cli_util.build_client('database', 'database', ctx) 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 8aef04b65..aacd513de 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 @@ -947,6 +947,28 @@ 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)""") +@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 + ) + cli_util.render_response(result, ctx) + + @data_masking_activity_group.command(name=cli_util.override('fusion_apps.get_data_masking_activity.command_name', 'get'), help=u"""Gets a DataMaskingActivity by identifier \n[Command Reference](getDataMaskingActivity)""") @cli_util.option('--fusion-environment-id', required=True, help=u"""unique FusionEnvironment identifier""") @cli_util.option('--data-masking-activity-id', required=True, help=u"""Unique DataMasking run identifier.""") @@ -1187,6 +1209,58 @@ def get_work_request(ctx, from_json, work_request_id): cli_util.render_response(result, ctx) +@fusion_environment_group.command(name=cli_util.override('fusion_apps.initiate_extract.command_name', 'initiate-extract'), help=u"""Begin the process of generating the data extract for a Fusion environment. \n[Command Reference](initiateExtract)""") +@cli_util.option('--fusion-environment-id', required=True, help=u"""unique FusionEnvironment identifier""") +@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 SUCCEEDED --wait-for-state FAILED would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.""") +@cli_util.option('--max-wait-seconds', type=click.INT, help="""The maximum time to wait for the work request to reach the state defined by --wait-for-state. Defaults to 1200 seconds.""") +@cli_util.option('--wait-interval-seconds', type=click.INT, help="""Check every --wait-interval-seconds to see whether the work request has reached the state defined by --wait-for-state. Defaults to 30 seconds.""") +@json_skeleton_utils.get_cli_json_input_option({}) +@cli_util.help_option +@click.pass_context +@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}) +@cli_util.wrap_exceptions +def initiate_extract(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, 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.initiate_extract( + fusion_environment_id=fusion_environment_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) + + @fusion_environment_group.command(name=cli_util.override('fusion_apps.list_admin_users.command_name', 'list-admin-users'), help=u"""List all FusionEnvironment admin users \n[Command Reference](listAdminUsers)""") @cli_util.option('--fusion-environment-id', required=True, help=u"""unique FusionEnvironment identifier""") @cli_util.option('--all', 'all_pages', is_flag=True, help="""Fetches all pages of results.""") 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 3822ac7ec..d6a5c9ae7 100644 --- a/services/fusion_apps/tests/util/generated/command_to_api.py +++ b/services/fusion_apps/tests/util/generated/command_to_api.py @@ -15,6 +15,7 @@ "fusion_apps.delete_fusion_environment_family": "oci.fusion_apps.FusionApplicationsClient.delete_fusion_environment_family", "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_fusion_environment": "oci.fusion_apps.FusionApplicationsClient.get_fusion_environment", "fusion_apps.get_fusion_environment_family": "oci.fusion_apps.FusionApplicationsClient.get_fusion_environment_family", @@ -25,6 +26,7 @@ "fusion_apps.get_scheduled_activity": "oci.fusion_apps.FusionApplicationsClient.get_scheduled_activity", "fusion_apps.get_service_attachment": "oci.fusion_apps.FusionApplicationsClient.get_service_attachment", "fusion_apps.get_work_request": "oci.fusion_apps.FusionApplicationsClient.get_work_request", + "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_fusion_environment_families": "oci.fusion_apps.FusionApplicationsClient.list_fusion_environment_families", diff --git a/services/globally_distributed_database/src/oci_cli_sharded_database_service/generated/shardeddatabaseservice_cli.py b/services/globally_distributed_database/src/oci_cli_sharded_database_service/generated/shardeddatabaseservice_cli.py index a26834d24..2eefaa066 100644 --- a/services/globally_distributed_database/src/oci_cli_sharded_database_service/generated/shardeddatabaseservice_cli.py +++ b/services/globally_distributed_database/src/oci_cli_sharded_database_service/generated/shardeddatabaseservice_cli.py @@ -471,6 +471,9 @@ def create_sharded_database(ctx, from_json, wait_for_state, max_wait_seconds, wa @cli_util.option('--catalog-details', required=True, type=custom_types.CLI_COMPLEX_TYPE, help=u"""Collection of ATP-Dedicated catalogs that needs to be created.""" + 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('--replication-method', help=u"""The Replication method for sharded database.""") +@cli_util.option('--replication-factor', type=click.INT, help=u"""The Replication factor for RAFT replication based sharded database. Currently supported values are 3, 5 and 7.""") +@cli_util.option('--replication-unit', type=click.INT, help=u"""For RAFT replication based sharded database, the value should be atleast twice the number of shards.""") @cli_util.option('--cluster-certificate-common-name', help=u"""The certificate common name used in all cloudAutonomousVmClusters for the sharded database topology. Eg. Production. All the clusters used in one sharded database topology shall have same CABundle setup. Valid characterset for clusterCertificateCommonName include uppercase or lowercase letters, numbers, hyphens, underscores, and period.""") @cli_util.option('--chunks', type=click.INT, help=u"""The default number of unique chunks in a shardspace. The value of chunks must be greater than 2 times the size of the largest shardgroup in any shardspace.""") @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "WAITING", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED"]), multiple=True, help="""This operation asynchronously creates, modifies or deletes a resource and uses a work request to track the progress of the operation. Specify this option to perform the action and then wait until the work request reaches a certain state. Multiple states can be specified, returning on the first state. For example, --wait-for-state SUCCEEDED --wait-for-state FAILED would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.""") @@ -481,7 +484,7 @@ def create_sharded_database(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={'freeform-tags': {'module': 'globally_distributed_database', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'globally_distributed_database', 'class': 'dict(str, dict(str, object))'}, 'shard-details': {'module': 'globally_distributed_database', 'class': 'list[CreateDedicatedShardDetail]'}, 'catalog-details': {'module': 'globally_distributed_database', 'class': 'list[CreateDedicatedCatalogDetail]'}}, output_type={'module': 'globally_distributed_database', 'class': 'ShardedDatabase'}) @cli_util.wrap_exceptions -def create_sharded_database_create_dedicated_sharded_database(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, compartment_id, display_name, db_workload, sharding_method, db_version, character_set, ncharacter_set, listener_port, listener_port_tls, ons_port_local, ons_port_remote, prefix, shard_details, catalog_details, freeform_tags, defined_tags, cluster_certificate_common_name, chunks): +def create_sharded_database_create_dedicated_sharded_database(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, compartment_id, display_name, db_workload, sharding_method, db_version, character_set, ncharacter_set, listener_port, listener_port_tls, ons_port_local, ons_port_remote, prefix, shard_details, catalog_details, freeform_tags, defined_tags, replication_method, replication_factor, replication_unit, cluster_certificate_common_name, chunks): kwargs = {} kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id']) @@ -508,6 +511,15 @@ def create_sharded_database_create_dedicated_sharded_database(ctx, from_json, wa if defined_tags is not None: _details['definedTags'] = cli_util.parse_json_parameter("defined_tags", defined_tags) + if replication_method is not None: + _details['replicationMethod'] = replication_method + + if replication_factor is not None: + _details['replicationFactor'] = replication_factor + + if replication_unit is not None: + _details['replicationUnit'] = replication_unit + if cluster_certificate_common_name is not None: _details['clusterCertificateCommonName'] = cluster_certificate_common_name @@ -782,6 +794,7 @@ def fetch_shardable_cloud_autonomous_vm_clusters(ctx, from_json, compartment_id, @sharded_database_group.command(name=cli_util.override('gdd.generate_gsm_certificate_signing_request.command_name', 'generate-gsm-certificate-signing-request'), help=u"""Generate the certificate signing request for GSM instances of the sharded database. Once certificate signing request is generated, then customers can download the certificate signing request using 'downloadGsmCertificateSigningRequest' api call. \n[Command Reference](generateGsmCertificateSigningRequest)""") @cli_util.option('--sharded-database-id', required=True, help=u"""Sharded Database 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('--ca-bundle-id', help=u"""The ID of the Ca Bundle.""") @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "WAITING", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED"]), multiple=True, help="""This operation asynchronously creates, modifies or deletes a resource and uses a work request to track the progress of the operation. Specify this option to perform the action and then wait until the work request reaches a certain state. Multiple states can be specified, returning on the first state. For example, --wait-for-state SUCCEEDED --wait-for-state FAILED would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.""") @cli_util.option('--max-wait-seconds', type=click.INT, help="""The maximum time to wait for the work request to reach the state defined by --wait-for-state. Defaults to 1200 seconds.""") @cli_util.option('--wait-interval-seconds', type=click.INT, help="""Check every --wait-interval-seconds to see whether the work request has reached the state defined by --wait-for-state. Defaults to 30 seconds.""") @@ -790,7 +803,7 @@ def fetch_shardable_cloud_autonomous_vm_clusters(ctx, from_json, compartment_id, @click.pass_context @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}) @cli_util.wrap_exceptions -def generate_gsm_certificate_signing_request(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, sharded_database_id, if_match): +def generate_gsm_certificate_signing_request(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, sharded_database_id, if_match, ca_bundle_id): if isinstance(sharded_database_id, six.string_types) and len(sharded_database_id.strip()) == 0: raise click.UsageError('Parameter --sharded-database-id cannot be whitespace or empty string') @@ -798,6 +811,8 @@ def generate_gsm_certificate_signing_request(ctx, from_json, wait_for_state, max kwargs = {} if if_match is not None: kwargs['if_match'] = if_match + if ca_bundle_id is not None: + kwargs['ca_bundle_id'] = ca_bundle_id kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id']) client = cli_util.build_client('globally_distributed_database', 'sharded_database_service', ctx) result = client.generate_gsm_certificate_signing_request( @@ -890,17 +905,20 @@ def generate_wallet(ctx, from_json, file, sharded_database_id, password, if_matc @private_endpoint_group.command(name=cli_util.override('gdd.get_private_endpoint.command_name', 'get'), help=u"""Get the PrivateEndpoint resource. \n[Command Reference](getPrivateEndpoint)""") @cli_util.option('--private-endpoint-id', required=True, help=u"""Oracle Sharded Database PrivateEndpoint identifier""") +@cli_util.option('--if-none-match', help=u"""For conditional requests. In the GET call for a resource, set the `If-None-Match` header to the value of the ETag from a previous GET (or POST or PUT) response for that resource. The server will return with either a 304 Not Modified response if the resource has not changed, or a 200 OK response with the updated representation.""") @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': 'globally_distributed_database', 'class': 'PrivateEndpoint'}) @cli_util.wrap_exceptions -def get_private_endpoint(ctx, from_json, private_endpoint_id): +def get_private_endpoint(ctx, from_json, private_endpoint_id, if_none_match): if isinstance(private_endpoint_id, six.string_types) and len(private_endpoint_id.strip()) == 0: raise click.UsageError('Parameter --private-endpoint-id cannot be whitespace or empty string') kwargs = {} + if if_none_match is not None: + kwargs['if_none_match'] = if_none_match kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id']) client = cli_util.build_client('globally_distributed_database', 'sharded_database_service', ctx) result = client.get_private_endpoint( @@ -913,12 +931,13 @@ def get_private_endpoint(ctx, from_json, private_endpoint_id): @sharded_database_group.command(name=cli_util.override('gdd.get_sharded_database.command_name', 'get'), help=u"""Gets the details of the Sharded database identified by given id. \n[Command Reference](getShardedDatabase)""") @cli_util.option('--sharded-database-id', required=True, help=u"""Sharded Database identifier""") @cli_util.option('--metadata', help=u"""Comma separated names of argument corresponding to which metadata need to be retrived, namely VM_CLUSTER_INFO, ADDITIONAL_RESOURCE_INFO. An example is metadata=VM_CLUSTER_INFO,ADDITIONAL_RESOURCE_INFO.""") +@cli_util.option('--if-none-match', help=u"""For conditional requests. In the GET call for a resource, set the `If-None-Match` header to the value of the ETag from a previous GET (or POST or PUT) response for that resource. The server will return with either a 304 Not Modified response if the resource has not changed, or a 200 OK response with the updated representation.""") @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': 'globally_distributed_database', 'class': 'ShardedDatabase'}) @cli_util.wrap_exceptions -def get_sharded_database(ctx, from_json, sharded_database_id, metadata): +def get_sharded_database(ctx, from_json, sharded_database_id, metadata, if_none_match): if isinstance(sharded_database_id, six.string_types) and len(sharded_database_id.strip()) == 0: raise click.UsageError('Parameter --sharded-database-id cannot be whitespace or empty string') @@ -926,6 +945,8 @@ def get_sharded_database(ctx, from_json, sharded_database_id, metadata): kwargs = {} if metadata is not None: kwargs['metadata'] = metadata + if if_none_match is not None: + kwargs['if_none_match'] = if_none_match kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id']) client = cli_util.build_client('globally_distributed_database', 'sharded_database_service', ctx) result = client.get_sharded_database( @@ -1402,6 +1423,61 @@ def prevalidate_sharded_database_prevalidate_create_payload(ctx, from_json, comp cli_util.render_response(result, ctx) +@private_endpoint_group.command(name=cli_util.override('gdd.reinstate_proxy_instance.command_name', 'reinstate-proxy-instance'), help=u"""API to reinstate the proxy instances associated with the private endpoint. \n[Command Reference](reinstateProxyInstance)""") +@cli_util.option('--private-endpoint-id', required=True, help=u"""Oracle Sharded Database PrivateEndpoint 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", "WAITING", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED"]), multiple=True, help="""This operation asynchronously creates, modifies or deletes a resource and uses a work request to track the progress of the operation. Specify this option to perform the action and then wait until the work request reaches a certain state. Multiple states can be specified, returning on the first state. For example, --wait-for-state SUCCEEDED --wait-for-state FAILED would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.""") +@cli_util.option('--max-wait-seconds', type=click.INT, help="""The maximum time to wait for the work request to reach the state defined by --wait-for-state. Defaults to 1200 seconds.""") +@cli_util.option('--wait-interval-seconds', type=click.INT, help="""Check every --wait-interval-seconds to see whether the work request has reached the state defined by --wait-for-state. Defaults to 30 seconds.""") +@json_skeleton_utils.get_cli_json_input_option({}) +@cli_util.help_option +@click.pass_context +@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}) +@cli_util.wrap_exceptions +def reinstate_proxy_instance(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, private_endpoint_id, if_match): + + if isinstance(private_endpoint_id, six.string_types) and len(private_endpoint_id.strip()) == 0: + raise click.UsageError('Parameter --private-endpoint-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('globally_distributed_database', 'sharded_database_service', ctx) + result = client.reinstate_proxy_instance( + private_endpoint_id=private_endpoint_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) + + @sharded_database_group.command(name=cli_util.override('gdd.start_sharded_database.command_name', 'start'), help=u"""Start the shards, catalog and GSMs of Sharded Database. \n[Command Reference](startShardedDatabase)""") @cli_util.option('--sharded-database-id', required=True, help=u"""Sharded Database 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.""") diff --git a/services/globally_distributed_database/tests/util/generated/command_to_api.py b/services/globally_distributed_database/tests/util/generated/command_to_api.py index 6aef7337b..89a31c6db 100644 --- a/services/globally_distributed_database/tests/util/generated/command_to_api.py +++ b/services/globally_distributed_database/tests/util/generated/command_to_api.py @@ -25,6 +25,7 @@ "gdd.list_work_requests": "oci.globally_distributed_database.ShardedDatabaseServiceClient.list_work_requests", "gdd.patch_sharded_database": "oci.globally_distributed_database.ShardedDatabaseServiceClient.patch_sharded_database", "gdd.prevalidate_sharded_database": "oci.globally_distributed_database.ShardedDatabaseServiceClient.prevalidate_sharded_database", + "gdd.reinstate_proxy_instance": "oci.globally_distributed_database.ShardedDatabaseServiceClient.reinstate_proxy_instance", "gdd.start_sharded_database": "oci.globally_distributed_database.ShardedDatabaseServiceClient.start_sharded_database", "gdd.stop_sharded_database": "oci.globally_distributed_database.ShardedDatabaseServiceClient.stop_sharded_database", "gdd.update_private_endpoint": "oci.globally_distributed_database.ShardedDatabaseServiceClient.update_private_endpoint", 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 07a99c510..b19c0466c 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 @@ -1208,7 +1208,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]'}, '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, password, security_protocol, description, freeform_tags, locks, defined_tags, vault_id, key_id, nsg_ids, subnet_id, routing_method, host, port, additional_attributes, ssl_mode, ssl_ca, ssl_crl, ssl_cert, ssl_key, private_ip): +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, password, security_protocol, description, freeform_tags, defined_tags, locks, vault_id, key_id, nsg_ids, subnet_id, routing_method, host, port, additional_attributes, ssl_mode, ssl_ca, ssl_crl, ssl_cert, ssl_key, private_ip, db_system_id): kwargs = {} kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id']) @@ -2682,6 +2682,9 @@ def create_connection_create_oci_object_storage_connection_details(ctx, from_jso @cli_util.option('--defined-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Tags defined 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('--locks', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Locks associated with this resource. + +This option is a JSON list with items of type AddResourceLockDetails. For documentation on AddResourceLockDetails please see our API reference: https://docs.cloud.oracle.com/api/#/en/goldengate/20200407/datatypes/AddResourceLockDetails.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP) @cli_util.option('--vault-id', 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', 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('--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) @@ -2696,12 +2699,12 @@ def create_connection_create_oci_object_storage_connection_details(ctx, from_jso @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 SUCCEEDED --wait-for-state FAILED would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.""") @cli_util.option('--max-wait-seconds', type=click.INT, help="""The maximum time to wait for the work request to reach the state defined by --wait-for-state. Defaults to 1200 seconds.""") @cli_util.option('--wait-interval-seconds', type=click.INT, help="""Check every --wait-interval-seconds to see whether the work request has reached the state defined by --wait-for-state. Defaults to 30 seconds.""") -@json_skeleton_utils.get_cli_json_input_option({'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]'}, 'additional-attributes': {'module': 'golden_gate', 'class': 'list[NameValuePair]'}}) +@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]'}, 'additional-attributes': {'module': 'golden_gate', 'class': 'list[NameValuePair]'}}) @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))'}, 'nsg-ids': {'module': 'golden_gate', 'class': 'list[string]'}, 'additional-attributes': {'module': 'golden_gate', 'class': 'list[NameValuePair]'}}, 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]'}, 'additional-attributes': {'module': 'golden_gate', 'class': 'list[NameValuePair]'}}, output_type={'module': 'golden_gate', 'class': 'Connection'}) @cli_util.wrap_exceptions -def create_connection_create_db2_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, password, security_protocol, description, freeform_tags, defined_tags, vault_id, key_id, nsg_ids, subnet_id, routing_method, additional_attributes, ssl_client_keystoredb, ssl_client_keystash, ssl_server_certificate): +def create_connection_create_db2_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, password, security_protocol, description, freeform_tags, defined_tags, locks, vault_id, key_id, nsg_ids, subnet_id, routing_method, additional_attributes, ssl_client_keystoredb, ssl_client_keystash, ssl_server_certificate): kwargs = {} kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id']) @@ -2726,6 +2729,9 @@ def create_connection_create_db2_connection_details(ctx, from_json, wait_for_sta if defined_tags is not None: _details['definedTags'] = cli_util.parse_json_parameter("defined_tags", defined_tags) + if locks is not None: + _details['locks'] = cli_util.parse_json_parameter("locks", locks) + if vault_id is not None: _details['vaultId'] = vault_id @@ -10267,6 +10273,7 @@ def update_connection_update_kafka_connection_details(ctx, from_json, force, wai @cli_util.option('--ssl-client-keystash', help=u"""The base64 encoded keystash file which contains the encrypted password to the key database file.""") @cli_util.option('--ssl-server-certificate', help=u"""The base64 encoded file which contains the self-signed server certificate / Certificate Authority (CA) certificate.""") @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(["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 SUCCEEDED --wait-for-state FAILED would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.""") @cli_util.option('--max-wait-seconds', type=click.INT, help="""The maximum time to wait for the work request to reach the state defined by --wait-for-state. Defaults to 1200 seconds.""") @@ -10276,7 +10283,7 @@ def update_connection_update_kafka_connection_details(ctx, from_json, force, 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))'}, 'nsg-ids': {'module': 'golden_gate', 'class': 'list[string]'}, 'additional-attributes': {'module': 'golden_gate', 'class': 'list[NameValuePair]'}}) @cli_util.wrap_exceptions -def update_connection_update_db2_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, database_name, host, port, username, password, additional_attributes, security_protocol, ssl_client_keystoredb, ssl_client_keystash, ssl_server_certificate, if_match): +def update_connection_update_db2_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, database_name, host, port, username, password, additional_attributes, security_protocol, ssl_client_keystoredb, ssl_client_keystash, ssl_server_certificate, 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') @@ -10288,6 +10295,8 @@ def update_connection_update_db2_connection_details(ctx, from_json, force, wait_ 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 = {} diff --git a/services/monitoring/src/oci_cli_monitoring/generated/monitoring_cli.py b/services/monitoring/src/oci_cli_monitoring/generated/monitoring_cli.py index a3ea6ab52..9c584140a 100644 --- a/services/monitoring/src/oci_cli_monitoring/generated/monitoring_cli.py +++ b/services/monitoring/src/oci_cli_monitoring/generated/monitoring_cli.py @@ -148,7 +148,7 @@ def change_alarm_compartment(ctx, from_json, alarm_id, compartment_id, if_match) @cli_util.option('--namespace', required=True, help=u"""The source service or application emitting the metric that is evaluated by the alarm. Example: `oci_computeagent`""") -@cli_util.option('--query-parameterconflict', required=True, help=u"""The Monitoring Query Language (MQL) expression to evaluate for the alarm. The Alarms feature of the Monitoring service interprets results for each returned time series as Boolean values, where zero represents false and a non-zero value represents true. A true value means that the trigger rule condition has been met. The query must specify a metric, statistic, interval, and trigger rule (threshold or absence). Supported values for interval depend on the specified time range. More interval values are supported for smaller time ranges. You can optionally specify dimensions and grouping functions. Supported grouping functions: `grouping()`, `groupBy()`. For information about writing MQL expressions, see [Editing the MQL Expression for a Query]. For details about MQL, see [Monitoring Query Language (MQL) Reference]. For available dimensions, review the metric definition for the supported service. See [Supported Services]. +@cli_util.option('--query-parameterconflict', required=True, help=u"""The Monitoring Query Language (MQL) expression to evaluate for the alarm. The Alarms feature of the Monitoring service interprets results for each returned time series as Boolean values, where zero represents false and a non-zero value represents true. A true value means that the trigger rule condition has been met. The query must specify a metric, statistic, interval, and trigger rule (threshold or absence). Supported values for interval depend on the specified time range. More interval values are supported for smaller time ranges. You can optionally specify dimensions and grouping functions. Also, you can customize the [absence detection period]. Supported grouping functions: `grouping()`, `groupBy()`. For information about writing MQL expressions, see [Editing the MQL Expression for a Query]. For details about MQL, see [Monitoring Query Language (MQL) Reference]. For available dimensions, review the metric definition for the supported service. See [Supported Services]. Example of threshold alarm: @@ -164,6 +164,12 @@ def change_alarm_compartment(ctx, from_json, alarm_id, compartment_id, if_match) CpuUtilization[1m]{availabilityDomain=\"cumS:PHX-AD-1\"}.absent() + ----- Example of absence alarm with custom absence detection period of 20 hours: + + ----- + + CpuUtilization[1m]{availabilityDomain=\"cumS:PHX-AD-1\"}.absent(20h) + -----""") @cli_util.option('--severity', required=True, help=u"""The perceived type of response required when the alarm is in the \"FIRING\" state. @@ -188,7 +194,7 @@ def change_alarm_compartment(ctx, from_json, alarm_id, compartment_id, if_match) The alarm updates its status to \"OK\" when the breaching condition has been clear for the most recent minute. Example: `PT5M`""") -@cli_util.option('--body', help=u"""The human-readable content of the delivered alarm notification. Oracle recommends providing guidance to operators for resolving the alarm condition. Consider adding links to standard runbook practices. Avoid entering confidential information. +@cli_util.option('--body', help=u"""The human-readable content of the delivered alarm notification. Optionally include [dynamic variables]. Oracle recommends providing guidance to operators for resolving the alarm condition. Consider adding links to standard runbook practices. Avoid entering confidential information. Example: `High CPU usage alert. Follow runbook instructions for resolution.`""") @cli_util.option('--is-notifications-per-metric-dimension-enabled', type=click.BOOL, help=u"""When set to `true`, splits alarm notifications per metric stream. When set to `false`, groups alarm notifications across metric streams. Example: `true`""") @@ -206,8 +212,11 @@ def change_alarm_compartment(ctx, from_json, alarm_id, compartment_id, if_match) Each override can specify values for query, severity, body, and pending duration. When an alarm contains overrides, the Monitoring service evaluates each override in order, beginning with the first override in the array (index position `0`), and then evaluates the alarm's base values (`ruleName` value of `BASE`). This option is a JSON list with items of type AlarmOverride. For documentation on AlarmOverride please see our API reference: https://docs.cloud.oracle.com/api/#/en/monitoring/20180401/datatypes/AlarmOverride.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP) -@cli_util.option('--rule-name', help=u"""Identifier of the alarm's base values for alarm evaluation, for use when the alarm contains overrides. A valid ruleName value starts with an alphabetic character and includes only alphanumeric characters, underscores and square brackets. Minimum number of characters: 3. Default value is `BASE`. For information about alarm overrides, see [AlarmOverride].""") +@cli_util.option('--rule-name', help=u"""Identifier of the alarm's base values for alarm evaluation, for use when the alarm contains overrides. Default value is `BASE`. For information about alarm overrides, see [AlarmOverride].""") @cli_util.option('--notification-version', help=u"""The version of the alarm notification to be delivered. Allowed value: `1.X` The value must start with a number (up to four digits), followed by a period and an uppercase X.""") +@cli_util.option('--notification-title', help=u"""Customizable notification title (`title` [alarm message parameter]). Optionally include [dynamic variables]. The notification title appears as the subject line in a formatted email message and as the title in a Slack message.""") +@cli_util.option('--evaluation-slack-duration', help=u"""Customizable slack period to wait for metric ingestion before evaluating the alarm. Specify a string in ISO 8601 format (`PT10M` for ten minutes or `PT1H` for one hour). Minimum: PT3M. Maximum: PT2H. Default: PT3M. For more information about the slack period, see [About the Internal Reset Period].""") +@cli_util.option('--alarm-summary', help=u"""Customizable alarm summary (`alarmSummary` [alarm message parameter]). Optionally include [dynamic variables]. The alarm summary appears within the body of the alarm message and in responses to [ListAlarmStatus] [GetAlarmHistory] and [RetrieveDimensionStates].""") @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACTIVE", "DELETING", "DELETED"]), multiple=True, help="""This operation creates, modifies or deletes a resource that has a defined lifecycle state. Specify this option to perform the action and then wait until the resource reaches a given lifecycle state. Multiple states can be specified, returning on the first state. For example, --wait-for-state SUCCEEDED --wait-for-state FAILED would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.""") @cli_util.option('--max-wait-seconds', type=click.INT, help="""The maximum time to wait for the resource to reach the lifecycle state defined by --wait-for-state. Defaults to 1200 seconds.""") @cli_util.option('--wait-interval-seconds', type=click.INT, help="""Check every --wait-interval-seconds to see whether the resource has reached the lifecycle state defined by --wait-for-state. Defaults to 30 seconds.""") @@ -216,7 +225,7 @@ def change_alarm_compartment(ctx, from_json, alarm_id, compartment_id, if_match) @click.pass_context @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'destinations': {'module': 'monitoring', 'class': 'list[string]'}, 'suppression': {'module': 'monitoring', 'class': 'Suppression'}, 'freeform-tags': {'module': 'monitoring', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'monitoring', 'class': 'dict(str, dict(str, object))'}, 'overrides': {'module': 'monitoring', 'class': 'list[AlarmOverride]'}}, output_type={'module': 'monitoring', 'class': 'Alarm'}) @cli_util.wrap_exceptions -def create_alarm(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, display_name, compartment_id, metric_compartment_id, namespace, query_parameterconflict, severity, destinations, is_enabled, metric_compartment_id_in_subtree, resource_group, resolution, pending_duration, body, is_notifications_per_metric_dimension_enabled, message_format, repeat_notification_duration, suppression, freeform_tags, defined_tags, overrides, rule_name, notification_version): +def create_alarm(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, display_name, compartment_id, metric_compartment_id, namespace, query_parameterconflict, severity, destinations, is_enabled, metric_compartment_id_in_subtree, resource_group, resolution, pending_duration, body, is_notifications_per_metric_dimension_enabled, message_format, repeat_notification_duration, suppression, freeform_tags, defined_tags, overrides, rule_name, notification_version, notification_title, evaluation_slack_duration, alarm_summary): kwargs = {} kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id']) @@ -273,6 +282,15 @@ def create_alarm(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval if notification_version is not None: _details['notificationVersion'] = notification_version + if notification_title is not None: + _details['notificationTitle'] = notification_title + + if evaluation_slack_duration is not None: + _details['evaluationSlackDuration'] = evaluation_slack_duration + + if alarm_summary is not None: + _details['alarmSummary'] = alarm_summary + client = cli_util.build_client('monitoring', 'monitoring', ctx) result = client.create_alarm( create_alarm_details=_details, @@ -1321,7 +1339,7 @@ def summarize_metrics_data(ctx, from_json, compartment_id, namespace, query_para @cli_util.option('--resource-group', help=u"""Resource group that you want to match. A null value returns only metric data that has no resource groups. The alarm retrieves metric data associated with the specified resource group only. Only one resource group can be applied per metric. A valid resourceGroup value starts with an alphabetical character and includes only alphanumeric characters, periods (.), underscores (_), hyphens (-), and dollar signs ($). Avoid entering confidential information. Example: `frontend-fleet`""") -@cli_util.option('--query-parameterconflict', help=u"""The Monitoring Query Language (MQL) expression to evaluate for the alarm. The Alarms feature of the Monitoring service interprets results for each returned time series as Boolean values, where zero represents false and a non-zero value represents true. A true value means that the trigger rule condition has been met. The query must specify a metric, statistic, interval, and trigger rule (threshold or absence). Supported values for interval depend on the specified time range. More interval values are supported for smaller time ranges. You can optionally specify dimensions and grouping functions. Supported grouping functions: `grouping()`, `groupBy()`. For information about writing MQL expressions, see [Editing the MQL Expression for a Query]. For details about MQL, see [Monitoring Query Language (MQL) Reference]. For available dimensions, review the metric definition for the supported service. See [Supported Services]. +@cli_util.option('--query-parameterconflict', help=u"""The Monitoring Query Language (MQL) expression to evaluate for the alarm. The Alarms feature of the Monitoring service interprets results for each returned time series as Boolean values, where zero represents false and a non-zero value represents true. A true value means that the trigger rule condition has been met. The query must specify a metric, statistic, interval, and trigger rule (threshold or absence). Supported values for interval depend on the specified time range. More interval values are supported for smaller time ranges. You can optionally specify dimensions and grouping functions. Also, you can customize the [absence detection period]. Supported grouping functions: `grouping()`, `groupBy()`. For information about writing MQL expressions, see [Editing the MQL Expression for a Query]. For details about MQL, see [Monitoring Query Language (MQL) Reference]. For available dimensions, review the metric definition for the supported service. See [Supported Services]. Example of threshold alarm: @@ -1337,6 +1355,12 @@ def summarize_metrics_data(ctx, from_json, compartment_id, namespace, query_para CpuUtilization[1m]{availabilityDomain=\"cumS:PHX-AD-1\"}.absent() + ----- Example of absence alarm with custom absence detection period of 20 hours: + + ----- + + CpuUtilization[1m]{availabilityDomain=\"cumS:PHX-AD-1\"}.absent(20h) + -----""") @cli_util.option('--resolution', help=u"""The time between calculated aggregation windows for the alarm. Supported value: `1m`""") @cli_util.option('--pending-duration', help=u"""The period of time that the condition defined in the alarm must persist before the alarm state changes from \"OK\" to \"FIRING\". For example, a value of 5 minutes means that the alarm must persist in breaching the condition for five minutes before the alarm updates its state to \"FIRING\". @@ -1351,7 +1375,7 @@ def summarize_metrics_data(ctx, from_json, compartment_id, namespace, query_para @cli_util.option('--severity', help=u"""The perceived severity of the alarm with regard to the affected system. Example: `CRITICAL`""") -@cli_util.option('--body', help=u"""The human-readable content of the delivered alarm notification. Oracle recommends providing guidance to operators for resolving the alarm condition. Consider adding links to standard runbook practices. Avoid entering confidential information. +@cli_util.option('--body', help=u"""The human-readable content of the delivered alarm notification. Optionally include [dynamic variables]. Oracle recommends providing guidance to operators for resolving the alarm condition. Consider adding links to standard runbook practices. Avoid entering confidential information. Example: `High CPU usage alert. Follow runbook instructions for resolution.`""") @cli_util.option('--is-notifications-per-metric-dimension-enabled', type=click.BOOL, help=u"""When set to `true`, splits alarm notifications per metric stream. When set to `false`, groups alarm notifications across metric streams.""") @@ -1373,8 +1397,11 @@ def summarize_metrics_data(ctx, from_json, compartment_id, namespace, query_para Each override can specify values for query, severity, body, and pending duration. When an alarm contains overrides, the Monitoring service evaluates each override in order, beginning with the first override in the array (index position `0`), and then evaluates the alarm's base values (`ruleName` value of `BASE`). This option is a JSON list with items of type AlarmOverride. For documentation on AlarmOverride please see our API reference: https://docs.cloud.oracle.com/api/#/en/monitoring/20180401/datatypes/AlarmOverride.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP) -@cli_util.option('--rule-name', help=u"""Identifier of the alarm's base values for alarm evaluation, for use when the alarm contains overrides. A valid ruleName value starts with an alphabetic character and includes only alphanumeric characters, underscores and square brackets. Minimum number of characters: 3. Default value is `BASE`. For information about alarm overrides, see [AlarmOverride].""") +@cli_util.option('--rule-name', help=u"""Identifier of the alarm's base values for alarm evaluation, for use when the alarm contains overrides. Default value is `BASE`. For information about alarm overrides, see [AlarmOverride].""") @cli_util.option('--notification-version', help=u"""The version of the alarm notification to be delivered. Allowed value: `1.X` The value must start with a number (up to four digits), followed by a period and an uppercase X.""") +@cli_util.option('--notification-title', help=u"""Customizable notification title (`title` [alarm message parameter]). Optionally include [dynamic variables]. The notification title appears as the subject line in a formatted email message and as the title in a Slack message.""") +@cli_util.option('--evaluation-slack-duration', help=u"""Customizable slack period to wait for metric ingestion before evaluating the alarm. Specify a string in ISO 8601 format (`PT10M` for ten minutes or `PT1H` for one hour). Minimum: PT3M. Maximum: PT2H. Default: PT3M. For more information about the slack period, see [About the Internal Reset Period].""") +@cli_util.option('--alarm-summary', help=u"""Customizable alarm summary (`alarmSummary` [alarm message parameter]). Optionally include [dynamic variables]. The alarm summary appears within the body of the alarm message and in responses to [ListAlarmStatus] [GetAlarmHistory] and [RetrieveDimensionStates].""") @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", "DELETING", "DELETED"]), multiple=True, help="""This operation creates, modifies or deletes a resource that has a defined lifecycle state. Specify this option to perform the action and then wait until the resource reaches a given lifecycle state. Multiple states can be specified, returning on the first state. For example, --wait-for-state SUCCEEDED --wait-for-state FAILED would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.""") @@ -1385,7 +1412,7 @@ def summarize_metrics_data(ctx, from_json, compartment_id, namespace, query_para @click.pass_context @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'destinations': {'module': 'monitoring', 'class': 'list[string]'}, 'suppression': {'module': 'monitoring', 'class': 'Suppression'}, 'freeform-tags': {'module': 'monitoring', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'monitoring', 'class': 'dict(str, dict(str, object))'}, 'overrides': {'module': 'monitoring', 'class': 'list[AlarmOverride]'}}, output_type={'module': 'monitoring', 'class': 'Alarm'}) @cli_util.wrap_exceptions -def update_alarm(ctx, from_json, force, wait_for_state, max_wait_seconds, wait_interval_seconds, alarm_id, display_name, compartment_id, metric_compartment_id, metric_compartment_id_in_subtree, namespace, resource_group, query_parameterconflict, resolution, pending_duration, severity, body, is_notifications_per_metric_dimension_enabled, message_format, destinations, repeat_notification_duration, suppression, is_enabled, freeform_tags, defined_tags, overrides, rule_name, notification_version, if_match): +def update_alarm(ctx, from_json, force, wait_for_state, max_wait_seconds, wait_interval_seconds, alarm_id, display_name, compartment_id, metric_compartment_id, metric_compartment_id_in_subtree, namespace, resource_group, query_parameterconflict, resolution, pending_duration, severity, body, is_notifications_per_metric_dimension_enabled, message_format, destinations, repeat_notification_duration, suppression, is_enabled, freeform_tags, defined_tags, overrides, rule_name, notification_version, notification_title, evaluation_slack_duration, alarm_summary, if_match): if isinstance(alarm_id, six.string_types) and len(alarm_id.strip()) == 0: raise click.UsageError('Parameter --alarm-id cannot be whitespace or empty string') @@ -1467,6 +1494,15 @@ def update_alarm(ctx, from_json, force, wait_for_state, max_wait_seconds, wait_i if notification_version is not None: _details['notificationVersion'] = notification_version + if notification_title is not None: + _details['notificationTitle'] = notification_title + + if evaluation_slack_duration is not None: + _details['evaluationSlackDuration'] = evaluation_slack_duration + + if alarm_summary is not None: + _details['alarmSummary'] = alarm_summary + client = cli_util.build_client('monitoring', 'monitoring', ctx) result = client.update_alarm( alarm_id=alarm_id, diff --git a/services/queue/src/oci_cli_queue/generated/queue_cli.py b/services/queue/src/oci_cli_queue/generated/queue_cli.py index bd0155847..2f8ac6b98 100644 --- a/services/queue/src/oci_cli_queue/generated/queue_cli.py +++ b/services/queue/src/oci_cli_queue/generated/queue_cli.py @@ -95,7 +95,7 @@ def delete_message(ctx, from_json, queue_id, message_receipt): cli_util.render_response(result, ctx) -@get_message_group.command(name=cli_util.override('queue.delete_messages.command_name', 'delete-messages'), help=u"""Deletes multiple messages from the queue. You must use the [messages endpoint] to delete messages. The messages endpoint may be different for different queues. Use [`GetQueue`] to find the queue's `messagesEndpoint`. \n[Command Reference](deleteMessages)""") +@get_message_group.command(name=cli_util.override('queue.delete_messages.command_name', 'delete-messages'), help=u"""Deletes multiple messages from the queue or the consumer group. Only messages from the same queue/consumer group can be deleted at once. You must use the [messages endpoint] to delete messages. The messages endpoint may be different for different queues. Use [`GetQueue`] to find the queue's `messagesEndpoint`. \n[Command Reference](deleteMessages)""") @cli_util.option('--queue-id', required=True, help=u"""The unique queue identifier.""") @cli_util.option('--entries', required=True, type=custom_types.CLI_COMPLEX_TYPE, help=u"""The array of messages to delete from a queue.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP) @json_skeleton_utils.get_cli_json_input_option({'entries': {'module': 'queue', 'class': 'list[DeleteMessagesDetailsEntry]'}}) @@ -301,7 +301,7 @@ def update_message(ctx, from_json, queue_id, message_receipt, visibility_in_seco cli_util.render_response(result, ctx) -@get_message_group.command(name=cli_util.override('queue.update_messages.command_name', 'update-messages'), help=u"""Updates multiple messages in the queue. You must use the [messages endpoint] to update messages. The messages endpoint may be different for different queues. Use [`GetQueue`] to find the queue's `messagesEndpoint`. \n[Command Reference](updateMessages)""") +@get_message_group.command(name=cli_util.override('queue.update_messages.command_name', 'update-messages'), help=u"""Updates multiple messages in the queue or the consumer group. Only messages from the same queue/consumer group can be updated at once. You must use the [messages endpoint] to update messages. The messages endpoint may be different for different queues. Use [`GetQueue`] to find the queue's `messagesEndpoint`. \n[Command Reference](updateMessages)""") @cli_util.option('--queue-id', required=True, help=u"""The unique queue identifier.""") @cli_util.option('--entries', required=True, type=custom_types.CLI_COMPLEX_TYPE, help=u"""The array of messages to update in a queue.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP) @json_skeleton_utils.get_cli_json_input_option({'entries': {'module': 'queue', 'class': 'list[UpdateMessagesDetailsEntry]'}}) diff --git a/services/queue/src/oci_cli_queue_admin/generated/queueadmin_cli.py b/services/queue/src/oci_cli_queue_admin/generated/queueadmin_cli.py index 3b13e3dfe..7179bc89e 100644 --- a/services/queue/src/oci_cli_queue_admin/generated/queueadmin_cli.py +++ b/services/queue/src/oci_cli_queue_admin/generated/queueadmin_cli.py @@ -317,7 +317,7 @@ def get_work_request(ctx, from_json, work_request_id): @queue_collection_group.command(name=cli_util.override('queue_admin.list_queues.command_name', 'list-queues'), help=u"""Returns a list of queues. \n[Command Reference](listQueues)""") @cli_util.option('--compartment-id', help=u"""The [OCID] of the compartment in which to list resources.""") -@cli_util.option('--lifecycle-state', type=custom_types.CliCaseInsensitiveChoice(["CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED", "FAILED"]), help=u"""A filter to return only resources their lifecycleState matches the given lifecycleState.""") +@cli_util.option('--lifecycle-state', type=custom_types.CliCaseInsensitiveChoice(["CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED", "FAILED", "INACTIVE"]), help=u"""A filter to return only resources their lifecycleState matches the given lifecycleState.""") @cli_util.option('--display-name', help=u"""A filter to return only resources that match the entire display name given.""") @cli_util.option('--id', help=u"""The unique queue identifier.""") @cli_util.option('--limit', type=click.INT, help=u"""For list pagination. The maximum number of results per page, or items to return in a paginated \"List\" call. For important details about how pagination works, see [List Pagination].""") diff --git a/setup.py b/setup.py index fb9370e17..956cf453c 100644 --- a/setup.py +++ b/setup.py @@ -30,7 +30,7 @@ def open_relative(*path): readme = f.read() requires = [ - 'oci==2.128.0', + 'oci==2.128.1', 'arrow>=1.0.0', 'certifi', 'click==8.0.4', diff --git a/src/oci_cli/version.py b/src/oci_cli/version.py index 1ed26bfd4..2cef573ea 100644 --- a/src/oci_cli/version.py +++ b/src/oci_cli/version.py @@ -2,4 +2,4 @@ # Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. # This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. -__version__ = '3.43.0' +__version__ = '3.43.1'